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
- DataGridRowHeader.cs
- TypeGeneratedEventArgs.cs
- CachedPathData.cs
- XDeferredAxisSource.cs
- VBIdentifierName.cs
- HwndAppCommandInputProvider.cs
- odbcmetadatafactory.cs
- cache.cs
- CodeSnippetExpression.cs
- IApplicationTrustManager.cs
- OleDbDataReader.cs
- XmlCharCheckingReader.cs
- PropagatorResult.cs
- ApplicationServiceHelper.cs
- ResetableIterator.cs
- EmptyEnumerable.cs
- ListItemCollection.cs
- ConfigUtil.cs
- control.ime.cs
- FieldDescriptor.cs
- LambdaCompiler.Address.cs
- TargetInvocationException.cs
- versioninfo.cs
- SerializationFieldInfo.cs
- DefaultSettingsSection.cs
- ContentIterators.cs
- RawMouseInputReport.cs
- PolyBezierSegment.cs
- Schema.cs
- SafeArrayTypeMismatchException.cs
- StringToken.cs
- RuntimeResourceSet.cs
- mansign.cs
- SystemTcpStatistics.cs
- ChtmlTextWriter.cs
- AdornedElementPlaceholder.cs
- MatrixTransform.cs
- DataKeyArray.cs
- StyleBamlRecordReader.cs
- ReadOnlyDictionary.cs
- RepeatBehaviorConverter.cs
- TypeUnloadedException.cs
- FacetEnabledSchemaElement.cs
- GenerateTemporaryAssemblyTask.cs
- SecurityUtils.cs
- Internal.cs
- TreeNodeEventArgs.cs
- TabRenderer.cs
- WebPartTransformer.cs
- TreeNodeCollection.cs
- ToolStripItemEventArgs.cs
- Journaling.cs
- NgenServicingAttributes.cs
- ImplicitInputBrush.cs
- IpcServerChannel.cs
- ImmutableObjectAttribute.cs
- PathSegmentCollection.cs
- MethodBuilderInstantiation.cs
- SHA384Managed.cs
- FileVersionInfo.cs
- SrgsItemList.cs
- TextServicesDisplayAttribute.cs
- TemplateControlCodeDomTreeGenerator.cs
- MetadataUtilsSmi.cs
- ApplicationManager.cs
- HttpHeaderCollection.cs
- XmlReader.cs
- InheritedPropertyChangedEventArgs.cs
- HttpWriter.cs
- StatusBarPanel.cs
- WindowsFormsSynchronizationContext.cs
- WorkflowServiceNamespace.cs
- OpenTypeCommon.cs
- Double.cs
- WinCategoryAttribute.cs
- XmlName.cs
- ObservableDictionary.cs
- ConvertEvent.cs
- OpCodes.cs
- BasicKeyConstraint.cs
- NavigatingCancelEventArgs.cs
- SmiXetterAccessMap.cs
- TextSegment.cs
- DelegatingTypeDescriptionProvider.cs
- PeerNearMe.cs
- ImageAnimator.cs
- Timer.cs
- CellTreeSimplifier.cs
- CachedTypeface.cs
- ScrollItemPattern.cs
- XpsS0ValidatingLoader.cs
- RegexParser.cs
- MarshalByRefObject.cs
- TimeSpanStorage.cs
- FacetChecker.cs
- AdornerHitTestResult.cs
- EllipseGeometry.cs
- ObjectAnimationBase.cs
- SQLMoneyStorage.cs
- XmlWriterSettings.cs