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
- HostedTransportConfigurationManager.cs
- PrimaryKeyTypeConverter.cs
- ForwardPositionQuery.cs
- ErrorRuntimeConfig.cs
- UnorderedHashRepartitionStream.cs
- GridViewCommandEventArgs.cs
- ValueHandle.cs
- WhitespaceRule.cs
- ReflectEventDescriptor.cs
- DataColumnPropertyDescriptor.cs
- Model3DGroup.cs
- ResourcesGenerator.cs
- UriSectionData.cs
- UInt32Storage.cs
- FontConverter.cs
- PublishLicense.cs
- SecurityUtils.cs
- xsdvalidator.cs
- Command.cs
- ColumnMap.cs
- XmlEncoding.cs
- ConfigurationManager.cs
- ApplicationBuildProvider.cs
- Logging.cs
- FlagPanel.cs
- Trace.cs
- Connector.xaml.cs
- ObjectDataSource.cs
- ImplicitInputBrush.cs
- sqlstateclientmanager.cs
- GestureRecognitionResult.cs
- ObjectDataSourceStatusEventArgs.cs
- InkCanvasAutomationPeer.cs
- ArithmeticException.cs
- SafeCryptContextHandle.cs
- ADMembershipProvider.cs
- SpellCheck.cs
- MessageQueueInstaller.cs
- FixedSOMContainer.cs
- DataGridViewRowStateChangedEventArgs.cs
- StringUtil.cs
- Environment.cs
- Bezier.cs
- InputReferenceExpression.cs
- Stack.cs
- TextContainerChangeEventArgs.cs
- XpsImageSerializationService.cs
- PolicyStatement.cs
- SystemIPInterfaceStatistics.cs
- LogWriteRestartAreaAsyncResult.cs
- _NegoStream.cs
- GridEntry.cs
- Dynamic.cs
- Win32Exception.cs
- JournalEntry.cs
- CurrentChangingEventArgs.cs
- CookieParameter.cs
- XamlFigureLengthSerializer.cs
- AsyncOperation.cs
- CodeAttributeDeclarationCollection.cs
- FocusManager.cs
- SchemaCollectionCompiler.cs
- Internal.cs
- ColorTranslator.cs
- SoapAttributeOverrides.cs
- InkCollectionBehavior.cs
- MultiView.cs
- HtmlMeta.cs
- TextHintingModeValidation.cs
- WorkflowServiceHostFactory.cs
- XmlSchemaExternal.cs
- TextRangeEditTables.cs
- ComboBox.cs
- PersonalizableTypeEntry.cs
- PriorityQueue.cs
- ComponentTray.cs
- QueryHandler.cs
- Activity.cs
- ControlDesigner.cs
- Viewport2DVisual3D.cs
- PreProcessor.cs
- HtmlInputHidden.cs
- DashStyle.cs
- DefaultTraceListener.cs
- AsyncStreamReader.cs
- SmiEventSink_DeferedProcessing.cs
- SqlAggregateChecker.cs
- IPPacketInformation.cs
- IItemProperties.cs
- ParamArrayAttribute.cs
- ObjectList.cs
- BufferedReadStream.cs
- PriorityRange.cs
- PKCS1MaskGenerationMethod.cs
- PathData.cs
- KeyGesture.cs
- PrintPreviewControl.cs
- SoundPlayer.cs
- HttpWebRequestElement.cs