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
- GeometryConverter.cs
- SqlClientWrapperSmiStream.cs
- EnvironmentPermission.cs
- GridProviderWrapper.cs
- RegexTree.cs
- CultureNotFoundException.cs
- DocumentScope.cs
- TemplatePagerField.cs
- InputLanguageEventArgs.cs
- XmlMemberMapping.cs
- TimeSpanValidator.cs
- DecoratedNameAttribute.cs
- NavigationProgressEventArgs.cs
- CharAnimationUsingKeyFrames.cs
- FunctionDetailsReader.cs
- PointAnimationClockResource.cs
- TypefaceCollection.cs
- MultiSelector.cs
- ProcessHostServerConfig.cs
- templategroup.cs
- ToolStripItemRenderEventArgs.cs
- TreeNodeCollection.cs
- CodeTypeReferenceSerializer.cs
- DeflateEmulationStream.cs
- unitconverter.cs
- RangeEnumerable.cs
- Misc.cs
- Rotation3DAnimation.cs
- SerTrace.cs
- TableCellCollection.cs
- Accessors.cs
- TextTreeRootNode.cs
- ToolTip.cs
- EntitySetBaseCollection.cs
- UInt32Converter.cs
- StaticSiteMapProvider.cs
- RequestQueryProcessor.cs
- OperationAbortedException.cs
- EllipticalNodeOperations.cs
- XmlCountingReader.cs
- HwndKeyboardInputProvider.cs
- Process.cs
- LineMetrics.cs
- GridViewItemAutomationPeer.cs
- TreeViewBindingsEditorForm.cs
- LayoutUtils.cs
- Marshal.cs
- HtmlHistory.cs
- ActivityCollectionMarkupSerializer.cs
- MembershipPasswordException.cs
- TraceEventCache.cs
- SecurityTokenSpecification.cs
- CacheHelper.cs
- Color.cs
- ScriptingSectionGroup.cs
- QilNode.cs
- WriteableBitmap.cs
- ImageList.cs
- QueryCursorEventArgs.cs
- BooleanSwitch.cs
- QilTernary.cs
- XmlCharCheckingReader.cs
- BufferModeSettings.cs
- KeyTimeConverter.cs
- RecognizedWordUnit.cs
- sqlnorm.cs
- TypeElementCollection.cs
- CommonGetThemePartSize.cs
- ForceCopyBuildProvider.cs
- Brush.cs
- DataGridClipboardHelper.cs
- IOException.cs
- VisualBasicReference.cs
- PlanCompiler.cs
- Pkcs7Signer.cs
- WeakReadOnlyCollection.cs
- Expander.cs
- BaseInfoTable.cs
- DelayedRegex.cs
- PrintDialogException.cs
- UpdateProgress.cs
- BamlLocalizabilityResolver.cs
- RandomNumberGenerator.cs
- ConfigurationManagerInternal.cs
- PreloadedPackages.cs
- InfiniteIntConverter.cs
- TextReader.cs
- ApplicationBuildProvider.cs
- CorrelationManager.cs
- ListViewPagedDataSource.cs
- ErrorStyle.cs
- CompatibleComparer.cs
- InsufficientMemoryException.cs
- ZipIORawDataFileBlock.cs
- RunInstallerAttribute.cs
- TwoPhaseCommit.cs
- XsltCompileContext.cs
- DelegatingMessage.cs
- HybridObjectCache.cs
- ClientSideProviderDescription.cs