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
- CommunicationException.cs
- Vars.cs
- WebBrowserContainer.cs
- VariableAction.cs
- DataListDesigner.cs
- FirstMatchCodeGroup.cs
- XmlDeclaration.cs
- NamespaceList.cs
- ToolboxDataAttribute.cs
- AbstractSvcMapFileLoader.cs
- XmlSchemaAttributeGroup.cs
- LiteralLink.cs
- BufferedReadStream.cs
- HTMLTagNameToTypeMapper.cs
- Style.cs
- ExpressionPrefixAttribute.cs
- WriteableBitmap.cs
- DebuggerAttributes.cs
- GlyphingCache.cs
- listitem.cs
- KeyNotFoundException.cs
- ErrorLog.cs
- ColumnMap.cs
- ScriptControlManager.cs
- WizardPanelChangingEventArgs.cs
- TransformGroup.cs
- RenderingEventArgs.cs
- MetaDataInfo.cs
- CodeDelegateInvokeExpression.cs
- DataControlImageButton.cs
- PeerNeighborManager.cs
- ComplexObject.cs
- Graph.cs
- ActivityCompletionCallbackWrapper.cs
- BitmapInitialize.cs
- XsdDataContractImporter.cs
- RemoteWebConfigurationHost.cs
- base64Transforms.cs
- ClassHandlersStore.cs
- UnsafeNativeMethods.cs
- FixedSOMLineCollection.cs
- RuntimeResourceSet.cs
- FontSource.cs
- HasCopySemanticsAttribute.cs
- GridViewCancelEditEventArgs.cs
- NameValueSectionHandler.cs
- Html32TextWriter.cs
- ProtocolElement.cs
- WebDisplayNameAttribute.cs
- BuildManagerHost.cs
- LockRenewalTask.cs
- Single.cs
- DrawingBrush.cs
- PageThemeBuildProvider.cs
- TextBox.cs
- NumericUpDownAcceleration.cs
- SystemWebExtensionsSectionGroup.cs
- TraceSection.cs
- BoolExpression.cs
- QueryReaderSettings.cs
- DataGridItemAttachedStorage.cs
- RtfToken.cs
- Int32Animation.cs
- EntityDataSourceDataSelection.cs
- ListControl.cs
- DateTimePicker.cs
- SkewTransform.cs
- PickDesigner.xaml.cs
- GradientBrush.cs
- DataDocumentXPathNavigator.cs
- PersonalizableAttribute.cs
- SourceItem.cs
- ListViewItemEventArgs.cs
- RegionIterator.cs
- DataGridViewAddColumnDialog.cs
- ColumnHeader.cs
- OracleFactory.cs
- ApplicationSecurityInfo.cs
- UIElement.cs
- XmlQueryRuntime.cs
- WriteTimeStream.cs
- Sentence.cs
- TableChangeProcessor.cs
- TdsParserSessionPool.cs
- TimeIntervalCollection.cs
- XsltInput.cs
- TextPenaltyModule.cs
- WeakReferenceKey.cs
- Line.cs
- ShadowGlyph.cs
- CodeMemberProperty.cs
- SecUtil.cs
- GridViewCellAutomationPeer.cs
- HostUtils.cs
- TextEditor.cs
- WebPartZoneBase.cs
- HitTestParameters.cs
- MetadataArtifactLoaderFile.cs
- SQLDoubleStorage.cs
- TextRenderer.cs