Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Serializer / StringCollectionMarkupSerializer.cs / 1305376 / StringCollectionMarkupSerializer.cs
namespace System.Workflow.ComponentModel.Serialization { using System; using System.Reflection; using System.Xml; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Workflow.ComponentModel.Compiler; internal sealed class StringCollectionMarkupSerializer : WorkflowMarkupSerializer { protected internal override PropertyInfo[] GetProperties(WorkflowMarkupSerializationManager manager, object obj) { return new PropertyInfo[] { }; } protected internal override bool CanSerializeToString(WorkflowMarkupSerializationManager serializationManager, object value) { if (serializationManager == null) throw new ArgumentNullException("serializationManager"); if (value == null) throw new ArgumentNullException("value"); return (value is ICollection); } protected internal override string SerializeToString(WorkflowMarkupSerializationManager serializationManager, object value) { if (serializationManager == null) throw new ArgumentNullException("serializationManager"); if (value == null) throw new ArgumentNullException("value"); return SynchronizationHandlesTypeConverter.Stringify(value as ICollection ); } protected internal override object DeserializeFromString(WorkflowMarkupSerializationManager serializationManager, Type propertyType, string value) { if (serializationManager == null) throw new ArgumentNullException("serializationManager"); if (propertyType == null) throw new ArgumentNullException("propertyType"); if (value == null) throw new ArgumentNullException("value"); // Work around For Bind based properties whose base type is an // ICollection or its derivative, special case! (A synchronization // handle cannot begin with a * because it won't be a language independent // identifier :) ) if (IsValidCompactAttributeFormat(value)) return DeserializeFromCompactFormat(serializationManager, serializationManager.WorkflowMarkupStack[typeof(XmlReader)] as XmlReader, value); else return SynchronizationHandlesTypeConverter.UnStringify(value); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. namespace System.Workflow.ComponentModel.Serialization { using System; using System.Reflection; using System.Xml; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Workflow.ComponentModel.Compiler; internal sealed class StringCollectionMarkupSerializer : WorkflowMarkupSerializer { protected internal override PropertyInfo[] GetProperties(WorkflowMarkupSerializationManager manager, object obj) { return new PropertyInfo[] { }; } protected internal override bool CanSerializeToString(WorkflowMarkupSerializationManager serializationManager, object value) { if (serializationManager == null) throw new ArgumentNullException("serializationManager"); if (value == null) throw new ArgumentNullException("value"); return (value is ICollection ); } protected internal override string SerializeToString(WorkflowMarkupSerializationManager serializationManager, object value) { if (serializationManager == null) throw new ArgumentNullException("serializationManager"); if (value == null) throw new ArgumentNullException("value"); return SynchronizationHandlesTypeConverter.Stringify(value as ICollection ); } protected internal override object DeserializeFromString(WorkflowMarkupSerializationManager serializationManager, Type propertyType, string value) { if (serializationManager == null) throw new ArgumentNullException("serializationManager"); if (propertyType == null) throw new ArgumentNullException("propertyType"); if (value == null) throw new ArgumentNullException("value"); // Work around For Bind based properties whose base type is an // ICollection or its derivative, special case! (A synchronization // handle cannot begin with a * because it won't be a language independent // identifier :) ) if (IsValidCompactAttributeFormat(value)) return DeserializeFromCompactFormat(serializationManager, serializationManager.WorkflowMarkupStack[typeof(XmlReader)] as XmlReader, value); else return SynchronizationHandlesTypeConverter.UnStringify(value); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ThreadAbortException.cs
- SettingsBindableAttribute.cs
- StylusPointDescription.cs
- CheckBoxField.cs
- EmbeddedMailObject.cs
- Helpers.cs
- HeaderUtility.cs
- PrintPreviewDialog.cs
- RsaKeyGen.cs
- IERequestCache.cs
- CaretElement.cs
- NullRuntimeConfig.cs
- _AutoWebProxyScriptEngine.cs
- __ComObject.cs
- XpsFilter.cs
- EditingContext.cs
- ConnectionConsumerAttribute.cs
- StylusPoint.cs
- Part.cs
- PrimitiveCodeDomSerializer.cs
- CatalogZone.cs
- HandlerFactoryCache.cs
- Privilege.cs
- HttpListenerException.cs
- ECDiffieHellmanCngPublicKey.cs
- ResourceContainer.cs
- ConstrainedDataObject.cs
- CompilerParameters.cs
- DeploymentSectionCache.cs
- DataControlFieldCell.cs
- CancellationHandlerDesigner.cs
- ReferenceService.cs
- RegisteredArrayDeclaration.cs
- ItemsControlAutomationPeer.cs
- SoapEnumAttribute.cs
- COAUTHIDENTITY.cs
- DbDataReader.cs
- PageAsyncTaskManager.cs
- CodeIdentifier.cs
- CompilerCollection.cs
- Subtract.cs
- InternalTypeHelper.cs
- DrawListViewItemEventArgs.cs
- SingleResultAttribute.cs
- designeractionlistschangedeventargs.cs
- wgx_commands.cs
- BulletedListDesigner.cs
- UnauthorizedWebPart.cs
- ReflectionTypeLoadException.cs
- CopyOfAction.cs
- SortFieldComparer.cs
- DebugHandleTracker.cs
- PngBitmapEncoder.cs
- SuppressMergeCheckAttribute.cs
- TTSEvent.cs
- Grid.cs
- XPathNode.cs
- CollectionEditVerbManager.cs
- CodeTypeDeclarationCollection.cs
- WorkflowRuntimeServiceElementCollection.cs
- SqlWriter.cs
- QueryCacheEntry.cs
- ConnectionsZoneDesigner.cs
- EqualityComparer.cs
- OutputCacheModule.cs
- WindowsPen.cs
- VectorAnimationBase.cs
- Animatable.cs
- CompoundFileDeflateTransform.cs
- AttributeCollection.cs
- __Error.cs
- ArraySegment.cs
- StorageEndPropertyMapping.cs
- BatchServiceHost.cs
- MsmqMessageSerializationFormat.cs
- HttpListenerElement.cs
- PolicyConversionContext.cs
- DataControlField.cs
- CodeAttributeDeclarationCollection.cs
- DetailsViewRowCollection.cs
- validationstate.cs
- DataGridViewColumnCollection.cs
- Section.cs
- PathSegmentCollection.cs
- XmlQueryTypeFactory.cs
- Overlapped.cs
- Comparer.cs
- HashMembershipCondition.cs
- FusionWrap.cs
- Buffer.cs
- SqlDataSourceWizardForm.cs
- JpegBitmapDecoder.cs
- RedirectionProxy.cs
- CodeDomConfigurationHandler.cs
- SelectionItemPattern.cs
- CookielessHelper.cs
- DataControlLinkButton.cs
- ForceCopyBuildProvider.cs
- SpotLight.cs
- PropertyEntry.cs