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
- AssemblyInfo.cs
- DetailsViewCommandEventArgs.cs
- Win32Native.cs
- ZipIOExtraFieldElement.cs
- XamlReader.cs
- IntegerValidator.cs
- ExpressionValueEditor.cs
- XPathSelfQuery.cs
- ConfigurationSectionGroupCollection.cs
- ADMembershipUser.cs
- NavigationProperty.cs
- VBCodeProvider.cs
- SafeBitVector32.cs
- Frame.cs
- ContextQuery.cs
- EventLogPermissionEntry.cs
- WebProxyScriptElement.cs
- PropertyValueUIItem.cs
- Opcode.cs
- CalendarButtonAutomationPeer.cs
- InstanceKeyNotReadyException.cs
- AsyncOperationManager.cs
- XmlUTF8TextReader.cs
- AdCreatedEventArgs.cs
- TableLayoutPanel.cs
- _NTAuthentication.cs
- GlobalEventManager.cs
- StretchValidation.cs
- PeerNameResolver.cs
- PenCursorManager.cs
- SqlGatherProducedAliases.cs
- FilterableAttribute.cs
- RemoteWebConfigurationHostServer.cs
- IOThreadScheduler.cs
- HtmlControlPersistable.cs
- DetailsViewCommandEventArgs.cs
- TextAdaptor.cs
- WebHeaderCollection.cs
- RuleElement.cs
- webeventbuffer.cs
- Visitors.cs
- VersionedStreamOwner.cs
- SourceElementsCollection.cs
- Viewport2DVisual3D.cs
- _ListenerRequestStream.cs
- cache.cs
- compensatingcollection.cs
- UInt32Converter.cs
- PassportAuthenticationModule.cs
- GeometryValueSerializer.cs
- Int32KeyFrameCollection.cs
- SectionVisual.cs
- MetadataProperty.cs
- WebPartVerbsEventArgs.cs
- DateTimeConstantAttribute.cs
- CodeCatchClause.cs
- SymbolEqualComparer.cs
- AppDomain.cs
- AVElementHelper.cs
- CodeRemoveEventStatement.cs
- TrackingCondition.cs
- AxisAngleRotation3D.cs
- RelationshipEndMember.cs
- LookupNode.cs
- TextProperties.cs
- TemplateControlCodeDomTreeGenerator.cs
- EmptyStringExpandableObjectConverter.cs
- MouseBinding.cs
- XmlSchemaSimpleContentRestriction.cs
- TimeStampChecker.cs
- ISFTagAndGuidCache.cs
- PropertyDescriptorCollection.cs
- TextHintingModeValidation.cs
- TextTreeExtractElementUndoUnit.cs
- UIElementParaClient.cs
- COAUTHINFO.cs
- Transform.cs
- TraceSection.cs
- OperationBehaviorAttribute.cs
- DefaultValueConverter.cs
- StatusBarItemAutomationPeer.cs
- DesignerVerb.cs
- CmsUtils.cs
- CodeArrayCreateExpression.cs
- XmlIgnoreAttribute.cs
- SignatureHelper.cs
- IdentityReference.cs
- SessionPageStateSection.cs
- XmlException.cs
- ParameterToken.cs
- TextRangeAdaptor.cs
- XsltFunctions.cs
- PenThreadPool.cs
- DataGridViewIntLinkedList.cs
- IResourceProvider.cs
- User.cs
- ScriptingAuthenticationServiceSection.cs
- DataStreams.cs
- StringResourceManager.cs
- LinkLabel.cs