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
- ErrorFormatter.cs
- ToolBarOverflowPanel.cs
- HttpCacheVaryByContentEncodings.cs
- Token.cs
- SortQueryOperator.cs
- TreeNodeCollection.cs
- AppManager.cs
- XAMLParseException.cs
- MessageHeaderDescriptionCollection.cs
- Addressing.cs
- ProcessDesigner.cs
- SiteMapPath.cs
- HitTestParameters.cs
- StorageTypeMapping.cs
- ToolStripItemTextRenderEventArgs.cs
- DirectoryInfo.cs
- ExtensionDataReader.cs
- SqlConnectionStringBuilder.cs
- DescendantQuery.cs
- TextDecorations.cs
- QuaternionAnimationUsingKeyFrames.cs
- KeyPullup.cs
- MatrixStack.cs
- PrintEvent.cs
- CommandField.cs
- BamlBinaryReader.cs
- PackWebRequest.cs
- ContentType.cs
- ObjectDisposedException.cs
- HostedHttpTransportManager.cs
- CompilerGlobalScopeAttribute.cs
- XmlSchemaSimpleType.cs
- FormViewPagerRow.cs
- ReferenceEqualityComparer.cs
- IISMapPath.cs
- XmlWrappingReader.cs
- DynamicFilter.cs
- EntityTemplateUserControl.cs
- LinqDataSourceInsertEventArgs.cs
- ValidationManager.cs
- ProjectionPlan.cs
- Style.cs
- MouseGesture.cs
- ServiceChannelFactory.cs
- DependentTransaction.cs
- WebServiceErrorEvent.cs
- XPathNodeIterator.cs
- GlyphingCache.cs
- GroupItem.cs
- DataSetFieldSchema.cs
- ConfigXmlText.cs
- WebServiceData.cs
- MultiViewDesigner.cs
- ItemMap.cs
- DiagnosticStrings.cs
- ServicesUtilities.cs
- XamlReaderConstants.cs
- _HeaderInfo.cs
- KeyValuePairs.cs
- EntityDataSourceContextCreatedEventArgs.cs
- BoolLiteral.cs
- PasswordBox.cs
- Calendar.cs
- StringDictionaryCodeDomSerializer.cs
- TaskFileService.cs
- XmlValueConverter.cs
- SqlDependencyUtils.cs
- TdsParserStaticMethods.cs
- BufferedWebEventProvider.cs
- SpAudioStreamWrapper.cs
- AnnotationResourceChangedEventArgs.cs
- NotFiniteNumberException.cs
- EntityDataSourceChangingEventArgs.cs
- WorkflowOwnerAsyncResult.cs
- PositiveTimeSpanValidator.cs
- ToolStripDropDownClosingEventArgs.cs
- DataRecordInfo.cs
- CompoundFileIOPermission.cs
- PrintingPermissionAttribute.cs
- Thread.cs
- MetadataSource.cs
- ObjectParameterCollection.cs
- SpecialNameAttribute.cs
- Bits.cs
- FormsIdentity.cs
- WebScriptMetadataFormatter.cs
- ControlParameter.cs
- TextFormatterHost.cs
- LinkAreaEditor.cs
- CriticalFinalizerObject.cs
- RepeatBehaviorConverter.cs
- TextMarkerSource.cs
- DataTable.cs
- DataAccessException.cs
- NameNode.cs
- StylusCaptureWithinProperty.cs
- AssemblySettingAttributes.cs
- ViewBase.cs
- HostProtectionPermission.cs
- XAMLParseException.cs