Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SingleTagSectionHandler.cs
- SchemaNotation.cs
- ThemeableAttribute.cs
- SqlOuterApplyReducer.cs
- SmiXetterAccessMap.cs
- cookiecontainer.cs
- XslVisitor.cs
- DetailsViewDeleteEventArgs.cs
- DiffuseMaterial.cs
- EmptyCollection.cs
- AssociatedControlConverter.cs
- MeasureItemEvent.cs
- OletxTransactionFormatter.cs
- XdrBuilder.cs
- Lasso.cs
- SectionRecord.cs
- handlecollector.cs
- SqlDataSource.cs
- FontSourceCollection.cs
- RayHitTestParameters.cs
- _UriSyntax.cs
- MembershipSection.cs
- UnsafeNetInfoNativeMethods.cs
- HtmlWindowCollection.cs
- WebBrowserBase.cs
- QueryOutputWriter.cs
- HtmlToClrEventProxy.cs
- QueryContinueDragEventArgs.cs
- AllowedAudienceUriElementCollection.cs
- MimeMapping.cs
- ValidatorCompatibilityHelper.cs
- RightsManagementPermission.cs
- DependencyPropertyChangedEventArgs.cs
- errorpatternmatcher.cs
- Accessible.cs
- ToolStripDropDownClosedEventArgs.cs
- TimeSpanStorage.cs
- RecoverInstanceLocksCommand.cs
- CodeGen.cs
- AdobeCFFWrapper.cs
- FileSystemEventArgs.cs
- AdornerDecorator.cs
- GlyphRun.cs
- ImmutableObjectAttribute.cs
- TraceInternal.cs
- ProvideValueServiceProvider.cs
- Utils.cs
- FeatureSupport.cs
- ParserHooks.cs
- StrongNameKeyPair.cs
- XmlSerializerNamespaces.cs
- CodeSubDirectory.cs
- BulletedListEventArgs.cs
- DataGridRelationshipRow.cs
- SHA1.cs
- Common.cs
- ControlValuePropertyAttribute.cs
- OutputCacheProviderCollection.cs
- ServiceOperationHelpers.cs
- NameNode.cs
- DefaultPrintController.cs
- TemplateBindingExtensionConverter.cs
- SecurityException.cs
- MultiBinding.cs
- _Win32.cs
- TemplateXamlParser.cs
- TextParagraphCache.cs
- ConstructorArgumentAttribute.cs
- InputLanguageCollection.cs
- XmlSchemaException.cs
- ProxyWebPart.cs
- DesignerValidatorAdapter.cs
- Size3DValueSerializer.cs
- Annotation.cs
- ApplicationContext.cs
- Interfaces.cs
- CLRBindingWorker.cs
- FactoryGenerator.cs
- FormViewPagerRow.cs
- ExternalException.cs
- BitmapEffectCollection.cs
- TextRangeEditLists.cs
- NullableConverter.cs
- FolderLevelBuildProvider.cs
- PolicyFactory.cs
- RegistryPermission.cs
- NullableConverter.cs
- WebPartEditVerb.cs
- HtmlTitle.cs
- RuntimeConfigLKG.cs
- RuleInfoComparer.cs
- ConfigXmlComment.cs
- GetBrowserTokenRequest.cs
- ErrorRuntimeConfig.cs
- BitmapData.cs
- EqualityComparer.cs
- DataServiceRequestException.cs
- HandlerFactoryCache.cs
- Transform3DCollection.cs
- regiisutil.cs