Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Serializer / WorkflowMarkupSerializationProvider.cs / 1305376 / WorkflowMarkupSerializationProvider.cs
namespace System.Workflow.ComponentModel.Serialization { using System; using System.IO; using System.CodeDom; using System.ComponentModel; using System.ComponentModel.Design; using System.ComponentModel.Design.Serialization; using System.Collections; using System.Xml; using System.Xml.Serialization; using System.Reflection; using System.Collections.Generic; using System.Diagnostics; using System.Text; using System.Globalization; using System.Workflow.ComponentModel.Compiler; using System.Workflow.ComponentModel.Design; using System.Runtime.Serialization; using System.Security.Permissions; using System.Collections.ObjectModel; using System.Drawing; #region Class WorkflowMarkupSerializationProvider internal class WorkflowMarkupSerializationProvider : IDesignerSerializationProvider { public virtual object GetSerializer(IDesignerSerializationManager manager, object currentSerializer, Type objectType, Type serializerType) { // If this isn't a serializer type we recognize, do nothing. Also, if metadata specified // a custom serializer, then use it. if (serializerType != typeof(WorkflowMarkupSerializer) || currentSerializer != null) return null; //DO NOT CHANGE THIS ORDER ELSE DICTIONARY WILL START GETTING SERIALIZED AS COLLECTION if (typeof(IDictionary).IsAssignableFrom(objectType)) return new DictionaryMarkupSerializer(); if (CollectionMarkupSerializer.IsValidCollectionType(objectType)) return new CollectionMarkupSerializer(); return new WorkflowMarkupSerializer(); } } #endregion } // 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.IO; using System.CodeDom; using System.ComponentModel; using System.ComponentModel.Design; using System.ComponentModel.Design.Serialization; using System.Collections; using System.Xml; using System.Xml.Serialization; using System.Reflection; using System.Collections.Generic; using System.Diagnostics; using System.Text; using System.Globalization; using System.Workflow.ComponentModel.Compiler; using System.Workflow.ComponentModel.Design; using System.Runtime.Serialization; using System.Security.Permissions; using System.Collections.ObjectModel; using System.Drawing; #region Class WorkflowMarkupSerializationProvider internal class WorkflowMarkupSerializationProvider : IDesignerSerializationProvider { public virtual object GetSerializer(IDesignerSerializationManager manager, object currentSerializer, Type objectType, Type serializerType) { // If this isn't a serializer type we recognize, do nothing. Also, if metadata specified // a custom serializer, then use it. if (serializerType != typeof(WorkflowMarkupSerializer) || currentSerializer != null) return null; //DO NOT CHANGE THIS ORDER ELSE DICTIONARY WILL START GETTING SERIALIZED AS COLLECTION if (typeof(IDictionary).IsAssignableFrom(objectType)) return new DictionaryMarkupSerializer(); if (CollectionMarkupSerializer.IsValidCollectionType(objectType)) return new CollectionMarkupSerializer(); return new WorkflowMarkupSerializer(); } } #endregion } // 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
- SecurityContext.cs
- XmlIlVisitor.cs
- RenderData.cs
- DependencyPropertyChangedEventArgs.cs
- StackBuilderSink.cs
- FixedPage.cs
- LocatorGroup.cs
- SecurityIdentifierElementCollection.cs
- ReadOnlyMetadataCollection.cs
- DbMetaDataFactory.cs
- StandardCommandToolStripMenuItem.cs
- LoginView.cs
- CollectionViewProxy.cs
- ScriptResourceAttribute.cs
- ShimAsPublicXamlType.cs
- CheckoutException.cs
- PkcsMisc.cs
- Brush.cs
- StatusStrip.cs
- RequestCacheValidator.cs
- VirtualizedContainerService.cs
- SqlParameter.cs
- EditorZone.cs
- CompressEmulationStream.cs
- TypeUtils.cs
- UniqueIdentifierService.cs
- SourceFileBuildProvider.cs
- PrePostDescendentsWalker.cs
- WindowsIPAddress.cs
- HiddenFieldPageStatePersister.cs
- DataContractSerializerFaultFormatter.cs
- _LocalDataStore.cs
- SrgsText.cs
- GPStream.cs
- Control.cs
- HttpAsyncResult.cs
- SystemTcpConnection.cs
- KeyBinding.cs
- ResourceProperty.cs
- DesignerSelectionListAdapter.cs
- MouseButtonEventArgs.cs
- DbConnectionPoolGroup.cs
- NullableLongMinMaxAggregationOperator.cs
- PeerEndPoint.cs
- TemplateBindingExpressionConverter.cs
- ContainerUtilities.cs
- DiscreteKeyFrames.cs
- BamlMapTable.cs
- Encoder.cs
- OdbcEnvironment.cs
- ScrollBarAutomationPeer.cs
- DataRow.cs
- PointConverter.cs
- BitmapFrameEncode.cs
- TextEffectCollection.cs
- WinFormsSecurity.cs
- TemplateKey.cs
- ReliableDuplexSessionChannel.cs
- ComponentResourceKey.cs
- DiscriminatorMap.cs
- DataGridViewCheckBoxCell.cs
- SyndicationFeed.cs
- DataControlPagerLinkButton.cs
- ExchangeUtilities.cs
- Internal.cs
- ColorContext.cs
- SemaphoreSecurity.cs
- BordersPage.cs
- ConnectionsZone.cs
- XmlSchemaComplexType.cs
- HandlerFactoryCache.cs
- ObjectReferenceStack.cs
- ZoomPercentageConverter.cs
- X509ScopedServiceCertificateElement.cs
- ArraySortHelper.cs
- BrowserCapabilitiesFactoryBase.cs
- DataGridCell.cs
- ProvidersHelper.cs
- SystemNetworkInterface.cs
- Soap12ServerProtocol.cs
- OdbcUtils.cs
- DesignTimeTemplateParser.cs
- SystemIPGlobalStatistics.cs
- ControlBuilderAttribute.cs
- DataGridViewBindingCompleteEventArgs.cs
- DataObject.cs
- StyleCollection.cs
- WebPartCollection.cs
- Inline.cs
- ThreadAbortException.cs
- AssertFilter.cs
- CollectionChangeEventArgs.cs
- MatrixAnimationUsingPath.cs
- DBParameter.cs
- CryptoKeySecurity.cs
- Duration.cs
- XmlUtil.cs
- IDReferencePropertyAttribute.cs
- BaseCollection.cs
- XPathMessageFilter.cs