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
- AutomationProperties.cs
- WindowsFormsSynchronizationContext.cs
- BooleanAnimationBase.cs
- CacheForPrimitiveTypes.cs
- StandardToolWindows.cs
- ExtensionFile.cs
- DetailsViewPagerRow.cs
- AnimatedTypeHelpers.cs
- CircleHotSpot.cs
- ValueQuery.cs
- OptimalTextSource.cs
- Compiler.cs
- InProcStateClientManager.cs
- SubMenuStyleCollection.cs
- ToolStripSplitStackLayout.cs
- PageAsyncTask.cs
- WebPartZone.cs
- ValueUtilsSmi.cs
- RequestQueryParser.cs
- safemediahandle.cs
- BadImageFormatException.cs
- EndpointInfoCollection.cs
- BindingExpression.cs
- EmptyStringExpandableObjectConverter.cs
- WindowsTokenRoleProvider.cs
- PropertyPathWorker.cs
- Atom10FormatterFactory.cs
- AttachedPropertyBrowsableAttribute.cs
- Container.cs
- DocumentOrderQuery.cs
- ProtocolsConfigurationHandler.cs
- processwaithandle.cs
- DatePickerAutomationPeer.cs
- ObjectListItemCollection.cs
- COM2PropertyBuilderUITypeEditor.cs
- WebDescriptionAttribute.cs
- MetabaseServerConfig.cs
- UInt32Storage.cs
- ValueTable.cs
- PackageDigitalSignature.cs
- ToolStripComboBox.cs
- UnsafeMethods.cs
- ServerValidateEventArgs.cs
- MetricEntry.cs
- InvariantComparer.cs
- MachineSettingsSection.cs
- Empty.cs
- AddInPipelineAttributes.cs
- RemotingAttributes.cs
- Brushes.cs
- HttpCapabilitiesBase.cs
- HashLookup.cs
- SizeValueSerializer.cs
- XmlCharType.cs
- SecurityTokenProvider.cs
- SqlSupersetValidator.cs
- HMACSHA384.cs
- SecureStringHasher.cs
- BuildProviderCollection.cs
- PointCollection.cs
- SspiWrapper.cs
- ToolTip.cs
- CompilerError.cs
- ManualResetEvent.cs
- GroupBox.cs
- ObjRef.cs
- GroupBoxAutomationPeer.cs
- OneOfConst.cs
- SystemIPGlobalProperties.cs
- DataGridViewCellStyle.cs
- CacheVirtualItemsEvent.cs
- CollectionContainer.cs
- AttachedPropertiesService.cs
- SoapMessage.cs
- NativeMethods.cs
- StringAttributeCollection.cs
- SortKey.cs
- GlobalItem.cs
- LambdaCompiler.Unary.cs
- CardSpaceException.cs
- ConsumerConnectionPoint.cs
- IIS7UserPrincipal.cs
- LicenseProviderAttribute.cs
- Paragraph.cs
- ListViewAutomationPeer.cs
- GridViewCancelEditEventArgs.cs
- SmiRecordBuffer.cs
- AssociatedControlConverter.cs
- QueryPageSettingsEventArgs.cs
- UIElement3D.cs
- MD5CryptoServiceProvider.cs
- HostedHttpRequestAsyncResult.cs
- basevalidator.cs
- ComponentCollection.cs
- ScriptReference.cs
- StructuredType.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- XmlChoiceIdentifierAttribute.cs
- ProfileBuildProvider.cs
- SID.cs