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
- DiagnosticEventProvider.cs
- NameTable.cs
- ZipIOCentralDirectoryBlock.cs
- CommandHelpers.cs
- ReferenceSchema.cs
- SiteMapNode.cs
- NullableLongSumAggregationOperator.cs
- CustomWebEventKey.cs
- PersonalizationProviderHelper.cs
- StyleTypedPropertyAttribute.cs
- WmlPageAdapter.cs
- SubclassTypeValidatorAttribute.cs
- DictationGrammar.cs
- ThreadPool.cs
- WebEventTraceProvider.cs
- ZipIOExtraField.cs
- PolicyException.cs
- RequestCacheEntry.cs
- SyndicationElementExtension.cs
- TypeSystemHelpers.cs
- TypedServiceOperationListItem.cs
- PresentationAppDomainManager.cs
- EventLogPropertySelector.cs
- ReaderContextStackData.cs
- SmtpNtlmAuthenticationModule.cs
- WebPartHelpVerb.cs
- SmtpTransport.cs
- ToolStripItemDesigner.cs
- XmlSchemaComplexContentExtension.cs
- SingletonConnectionReader.cs
- PackageRelationship.cs
- ModuleConfigurationInfo.cs
- Control.cs
- Pair.cs
- XsdDuration.cs
- PropertyValueChangedEvent.cs
- StringExpressionSet.cs
- RegexRunner.cs
- CompilerGeneratedAttribute.cs
- GuidelineCollection.cs
- Send.cs
- XPathMessageFilterTable.cs
- SchemaType.cs
- MaskDescriptor.cs
- _ServiceNameStore.cs
- CapabilitiesUse.cs
- FileReader.cs
- TemplateBuilder.cs
- SelectionRange.cs
- ShaderRenderModeValidation.cs
- CheckPair.cs
- FieldToken.cs
- IISMapPath.cs
- CatalogPartCollection.cs
- xsdvalidator.cs
- AutoFocusStyle.xaml.cs
- InteropEnvironment.cs
- Win32.cs
- __Filters.cs
- DocumentXmlWriter.cs
- ObjectTokenCategory.cs
- HashCodeCombiner.cs
- SetStoryboardSpeedRatio.cs
- XmlSortKey.cs
- Highlights.cs
- FamilyMapCollection.cs
- PersistenceContextEnlistment.cs
- TypeUsage.cs
- WebSysDescriptionAttribute.cs
- CompilationUnit.cs
- Profiler.cs
- Int64Animation.cs
- CustomCategoryAttribute.cs
- StrokeNodeOperations.cs
- MetadataResolver.cs
- Point4D.cs
- DataGridViewCellStyleConverter.cs
- WebPartTracker.cs
- FloatUtil.cs
- TaiwanLunisolarCalendar.cs
- ServicePoint.cs
- entityreference_tresulttype.cs
- PropertyEntry.cs
- CheckBoxList.cs
- X509CertificateRecipientClientCredential.cs
- DispatcherOperation.cs
- Helper.cs
- CompositeControl.cs
- MethodImplAttribute.cs
- Component.cs
- Condition.cs
- ModuleBuilderData.cs
- WebSysDescriptionAttribute.cs
- CodeDOMProvider.cs
- DomainUpDown.cs
- InkCanvas.cs
- Int32Rect.cs
- User.cs
- OrderedDictionaryStateHelper.cs
- TemplateField.cs