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
- TypeNameConverter.cs
- DoWhile.cs
- XmlAnyElementAttribute.cs
- EncryptedReference.cs
- ValueUnavailableException.cs
- DoubleConverter.cs
- _AuthenticationState.cs
- DataGridColumnHeaderAutomationPeer.cs
- HWStack.cs
- HttpCookiesSection.cs
- MarshalDirectiveException.cs
- HtmlElementEventArgs.cs
- MaskDesignerDialog.cs
- ListView.cs
- GridSplitter.cs
- FilterException.cs
- WebScriptEnablingBehavior.cs
- ThreadStaticAttribute.cs
- Vertex.cs
- Parallel.cs
- BufferBuilder.cs
- ByteStreamBufferedMessageData.cs
- ButtonBaseDesigner.cs
- DetailsViewUpdatedEventArgs.cs
- TreeBuilder.cs
- BasicExpressionVisitor.cs
- WindowsScrollBar.cs
- ChtmlTextWriter.cs
- XPathMultyIterator.cs
- WebEventTraceProvider.cs
- SchemaAttDef.cs
- SQLRoleProvider.cs
- ObjectAnimationUsingKeyFrames.cs
- FormsAuthenticationTicket.cs
- EntityKey.cs
- ObjectListFieldsPage.cs
- UnsafeNativeMethods.cs
- PropagatorResult.cs
- PermissionSetTriple.cs
- CompilerGlobalScopeAttribute.cs
- TableCell.cs
- BookmarkManager.cs
- TemplatedMailWebEventProvider.cs
- TraversalRequest.cs
- LicenseContext.cs
- SQLDoubleStorage.cs
- HtmlFormWrapper.cs
- DefinitionBase.cs
- UIPermission.cs
- WpfWebRequestHelper.cs
- BuilderInfo.cs
- DuplicateMessageDetector.cs
- DbProviderFactoriesConfigurationHandler.cs
- ServiceDebugElement.cs
- xml.cs
- ParallelDesigner.cs
- DbgUtil.cs
- TdsParserStateObject.cs
- PropertyToken.cs
- SmtpFailedRecipientsException.cs
- ByteKeyFrameCollection.cs
- AuthenticationService.cs
- GridViewDeleteEventArgs.cs
- XmlQueryStaticData.cs
- DbMetaDataCollectionNames.cs
- EventRoute.cs
- CacheMemory.cs
- TreeView.cs
- AuthStoreRoleProvider.cs
- ReflectionTypeLoadException.cs
- TrackBarRenderer.cs
- PngBitmapEncoder.cs
- AccessDataSourceView.cs
- util.cs
- CodeValidator.cs
- PlatformCulture.cs
- ClassicBorderDecorator.cs
- SplashScreen.cs
- LongCountAggregationOperator.cs
- FileDialog_Vista_Interop.cs
- Viewport3DAutomationPeer.cs
- UpdatePanelControlTrigger.cs
- ImageBrush.cs
- Point3DConverter.cs
- UIElement.cs
- AbstractDataSvcMapFileLoader.cs
- PropertyStore.cs
- PropertyEmitterBase.cs
- ThemeableAttribute.cs
- ApplicationHost.cs
- XmlSortKeyAccumulator.cs
- InternalMappingException.cs
- MenuCommand.cs
- Debug.cs
- TickBar.cs
- EntityDataSourceWrapperCollection.cs
- TreeView.cs
- BinaryMethodMessage.cs
- SafeHandle.cs
- ToolStripSeparator.cs