Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- IgnorePropertiesAttribute.cs
- UIElementAutomationPeer.cs
- QueryableDataSourceEditData.cs
- OleDbCommandBuilder.cs
- GetPageCompletedEventArgs.cs
- SafeCryptHandles.cs
- SelectionPatternIdentifiers.cs
- BaseComponentEditor.cs
- LocationEnvironment.cs
- base64Transforms.cs
- XmlSortKeyAccumulator.cs
- StrongName.cs
- XmlCollation.cs
- ConnectionsZone.cs
- LZCodec.cs
- TransactionBridge.cs
- ChangesetResponse.cs
- RelationshipEndCollection.cs
- WorkItem.cs
- ColumnCollection.cs
- StateFinalizationActivity.cs
- DecimalConstantAttribute.cs
- RelationshipDetailsCollection.cs
- XmlnsDictionary.cs
- AlphabeticalEnumConverter.cs
- CultureInfo.cs
- XmlDocumentFieldSchema.cs
- XPathAncestorIterator.cs
- CookieProtection.cs
- TdsParserHelperClasses.cs
- HashRepartitionStream.cs
- AppliesToBehaviorDecisionTable.cs
- IsolatedStorageFilePermission.cs
- SqlConnectionPoolGroupProviderInfo.cs
- SafeEventLogWriteHandle.cs
- recordstatescratchpad.cs
- ConfigUtil.cs
- DSASignatureFormatter.cs
- DataKey.cs
- Resources.Designer.cs
- BooleanAnimationUsingKeyFrames.cs
- MatrixCamera.cs
- ScriptIgnoreAttribute.cs
- OutputScopeManager.cs
- PageCatalogPart.cs
- SafePointer.cs
- X509Chain.cs
- ObjectContext.cs
- ConnectionPoolManager.cs
- SynchronizedDispatch.cs
- Native.cs
- ActivityExecutorSurrogate.cs
- DataObjectSettingDataEventArgs.cs
- TextFindEngine.cs
- ObjectListCommandEventArgs.cs
- WebColorConverter.cs
- Inflater.cs
- SystemEvents.cs
- DataSourceHelper.cs
- pingexception.cs
- PagedDataSource.cs
- PerformanceCounter.cs
- FixedFindEngine.cs
- Cursor.cs
- WeakReadOnlyCollection.cs
- SchemaNames.cs
- ellipse.cs
- TextHidden.cs
- LocationUpdates.cs
- MediaContext.cs
- IPAddress.cs
- ModelMemberCollection.cs
- _AutoWebProxyScriptWrapper.cs
- SystemWebCachingSectionGroup.cs
- Int32RectValueSerializer.cs
- DetailsViewInsertedEventArgs.cs
- DrawListViewItemEventArgs.cs
- ClientUtils.cs
- PropagatorResult.cs
- SqlBulkCopyColumnMappingCollection.cs
- XPathSingletonIterator.cs
- FileChangeNotifier.cs
- DoubleCollectionValueSerializer.cs
- OleDbPropertySetGuid.cs
- ProofTokenCryptoHandle.cs
- StackBuilderSink.cs
- RealizationContext.cs
- ScriptControl.cs
- Win32.cs
- X509CertificateStore.cs
- ConfigurationValues.cs
- FontTypeConverter.cs
- XPathParser.cs
- ToolZone.cs
- dbdatarecord.cs
- XslNumber.cs
- SchemaNotation.cs
- DbDataSourceEnumerator.cs
- Bits.cs
- ScriptComponentDescriptor.cs