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
- RSAPKCS1SignatureDeformatter.cs
- SHA512.cs
- LineServices.cs
- ActivationArguments.cs
- DiscoveryClientOutputChannel.cs
- ColorContextHelper.cs
- AxisAngleRotation3D.cs
- EntityClassGenerator.cs
- NameValuePair.cs
- DEREncoding.cs
- ToolStripArrowRenderEventArgs.cs
- SafeHandle.cs
- PropertyDescriptor.cs
- TypeElement.cs
- CustomAttributeSerializer.cs
- XmlTextReaderImplHelpers.cs
- UserPreferenceChangedEventArgs.cs
- PeerNameRecordCollection.cs
- ForwardPositionQuery.cs
- GenericRootAutomationPeer.cs
- CodeDOMUtility.cs
- EdmValidator.cs
- ProgressBarAutomationPeer.cs
- Rotation3DAnimation.cs
- ActivityBuilder.cs
- Vector3DAnimation.cs
- MonthChangedEventArgs.cs
- DataListAutoFormat.cs
- FirstMatchCodeGroup.cs
- WmlObjectListAdapter.cs
- EventBuilder.cs
- SoapRpcServiceAttribute.cs
- AppDomainFactory.cs
- LogWriteRestartAreaAsyncResult.cs
- NameScope.cs
- RegionIterator.cs
- TextTreeObjectNode.cs
- ConstantCheck.cs
- HttpStreams.cs
- ExpressionPrefixAttribute.cs
- ProcessHostFactoryHelper.cs
- ThemeInfoAttribute.cs
- InvokeMethodDesigner.xaml.cs
- TrackingConditionCollection.cs
- DateTimeOffsetConverter.cs
- TextEditorSpelling.cs
- FontEmbeddingManager.cs
- Rfc2898DeriveBytes.cs
- TransformProviderWrapper.cs
- MasterPageBuildProvider.cs
- SoapTypeAttribute.cs
- ThicknessKeyFrameCollection.cs
- AsymmetricKeyExchangeDeformatter.cs
- ObjectDataSourceView.cs
- SafePEFileHandle.cs
- BaseWebProxyFinder.cs
- DataGridViewColumn.cs
- Model3DGroup.cs
- KeyTime.cs
- ScrollBar.cs
- PixelFormatConverter.cs
- PolicyStatement.cs
- XmlEnumAttribute.cs
- BitSet.cs
- PackageProperties.cs
- XmlDataProvider.cs
- SqlInternalConnectionTds.cs
- WsatConfiguration.cs
- Stream.cs
- WinInet.cs
- NamespaceEmitter.cs
- HtmlTable.cs
- ICollection.cs
- FormViewUpdatedEventArgs.cs
- PolicyVersion.cs
- SmtpClient.cs
- Rules.cs
- Qualifier.cs
- LogRestartAreaEnumerator.cs
- InputMethodStateChangeEventArgs.cs
- PasswordTextContainer.cs
- VectorCollectionConverter.cs
- ValidationPropertyAttribute.cs
- TreeViewItemAutomationPeer.cs
- NumericUpDown.cs
- SafeLibraryHandle.cs
- AxisAngleRotation3D.cs
- OleDbInfoMessageEvent.cs
- AxisAngleRotation3D.cs
- WebPartEditorApplyVerb.cs
- RegexCaptureCollection.cs
- HandlerMappingMemo.cs
- BitmapEffectRenderDataResource.cs
- Message.cs
- TraceListeners.cs
- FileEnumerator.cs
- Matrix.cs
- PathTooLongException.cs
- InstanceDescriptor.cs
- MemberDomainMap.cs