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
- Vector3DAnimationBase.cs
- DataGridItemCollection.cs
- ColumnWidthChangingEvent.cs
- _FixedSizeReader.cs
- HttpWebRequestElement.cs
- ReadOnlyNameValueCollection.cs
- ComponentResourceKeyConverter.cs
- WorkflowTimerService.cs
- OrCondition.cs
- ParameterCollection.cs
- XmlRawWriter.cs
- KoreanLunisolarCalendar.cs
- SubpageParaClient.cs
- BCryptHashAlgorithm.cs
- Emitter.cs
- MetabaseSettingsIis7.cs
- PolygonHotSpot.cs
- DataFormats.cs
- FormattedText.cs
- ImageDrawing.cs
- FileDialogPermission.cs
- GridViewRowCollection.cs
- OrderPreservingPipeliningMergeHelper.cs
- AspNetHostingPermission.cs
- ListViewInsertedEventArgs.cs
- NonSerializedAttribute.cs
- SafeFileMappingHandle.cs
- RenderContext.cs
- SmiContext.cs
- WindowsGraphics2.cs
- EntityConnection.cs
- WebSysDescriptionAttribute.cs
- XmlNamespaceManager.cs
- IArgumentProvider.cs
- DnsEndPoint.cs
- SHA512Managed.cs
- RegexGroup.cs
- TemplateControlBuildProvider.cs
- StaticFileHandler.cs
- SamlSubjectStatement.cs
- CommandPlan.cs
- Error.cs
- IndentedTextWriter.cs
- MultipleViewPatternIdentifiers.cs
- ModelUIElement3D.cs
- Rules.cs
- Bits.cs
- DecoderReplacementFallback.cs
- MinimizableAttributeTypeConverter.cs
- ColorConverter.cs
- PersonalizationProviderCollection.cs
- TripleDESCryptoServiceProvider.cs
- KnownBoxes.cs
- TypedColumnHandler.cs
- EventMappingSettingsCollection.cs
- CommandEventArgs.cs
- CodeExpressionCollection.cs
- SourceFileInfo.cs
- ThousandthOfEmRealPoints.cs
- PerspectiveCamera.cs
- BitmapInitialize.cs
- Int16Converter.cs
- FlowLayoutPanelDesigner.cs
- DataSourceDescriptorCollection.cs
- XsdDateTime.cs
- Attribute.cs
- SystemWebCachingSectionGroup.cs
- CompileLiteralTextParser.cs
- RequestCacheEntry.cs
- ForeignKeyConstraint.cs
- MSAANativeProvider.cs
- Rule.cs
- ViewManager.cs
- XmlSchemaExporter.cs
- ContextMenu.cs
- COM2ExtendedUITypeEditor.cs
- Cursors.cs
- ProfileManager.cs
- EntryIndex.cs
- SymbolPair.cs
- ControlPersister.cs
- StateRuntime.cs
- SystemIPInterfaceProperties.cs
- RemotingException.cs
- FixedSOMFixedBlock.cs
- ManualResetEvent.cs
- FormViewInsertedEventArgs.cs
- ImageDrawing.cs
- WindowsFormsHostAutomationPeer.cs
- WebPartManager.cs
- SingleTagSectionHandler.cs
- SiteOfOriginPart.cs
- MinMaxParagraphWidth.cs
- ClientSettings.cs
- XmlSchemaAnnotated.cs
- CaseInsensitiveHashCodeProvider.cs
- ValueType.cs
- EntityContainerEntitySet.cs
- wpf-etw.cs
- MeasureItemEvent.cs