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
- Vector3DCollection.cs
- DependsOnAttribute.cs
- FileSystemInfo.cs
- RadioButton.cs
- DataGridParentRows.cs
- CaseInsensitiveComparer.cs
- x509store.cs
- SyncOperationState.cs
- NavigatingCancelEventArgs.cs
- TextDocumentView.cs
- HtmlTernaryTree.cs
- StructuredTypeEmitter.cs
- NameSpaceExtractor.cs
- MethodAccessException.cs
- SystemFonts.cs
- CompModSwitches.cs
- BackEase.cs
- ProtocolsInstallComponent.cs
- SimpleBitVector32.cs
- ToolStripItemEventArgs.cs
- ScrollData.cs
- TableAdapterManagerMethodGenerator.cs
- HtmlPanelAdapter.cs
- GridItemProviderWrapper.cs
- ElementHostAutomationPeer.cs
- StringDictionaryEditor.cs
- MouseCaptureWithinProperty.cs
- DeclarativeCatalogPart.cs
- LinqDataSourceInsertEventArgs.cs
- StorageBasedPackageProperties.cs
- PropertyGrid.cs
- SessionSwitchEventArgs.cs
- WebPartUserCapability.cs
- Rfc2898DeriveBytes.cs
- HashCodeCombiner.cs
- SByte.cs
- HttpCookie.cs
- UnsafeNativeMethods.cs
- AssertSection.cs
- MarkupCompilePass2.cs
- ConfigDefinitionUpdates.cs
- DashStyle.cs
- DataKeyPropertyAttribute.cs
- XmlSchemaComplexContent.cs
- BaseCAMarshaler.cs
- DiagnosticsConfiguration.cs
- WebPartAddingEventArgs.cs
- SizeLimitedCache.cs
- HMACSHA384.cs
- _CommandStream.cs
- HitTestWithGeometryDrawingContextWalker.cs
- XmlProcessingInstruction.cs
- SupportingTokenSpecification.cs
- safesecurityhelperavalon.cs
- LinkArea.cs
- PathGradientBrush.cs
- ImageSource.cs
- StringTraceRecord.cs
- bidPrivateBase.cs
- _HTTPDateParse.cs
- RuntimeArgumentHandle.cs
- TriggerBase.cs
- HashMembershipCondition.cs
- ReferenceCountedObject.cs
- SharedStatics.cs
- SecureConversationSecurityTokenParameters.cs
- EncodingFallbackAwareXmlTextWriter.cs
- TextServicesDisplayAttributePropertyRanges.cs
- SqlDataSourceDesigner.cs
- ParserHooks.cs
- ScalarConstant.cs
- ToolStripOverflow.cs
- FilePrompt.cs
- SystemColorTracker.cs
- MarkupCompilePass2.cs
- LogLogRecordHeader.cs
- InlinedAggregationOperator.cs
- SelectionItemPattern.cs
- TokenizerHelper.cs
- Events.cs
- Screen.cs
- ForceCopyBuildProvider.cs
- UserUseLicenseDictionaryLoader.cs
- PenLineJoinValidation.cs
- HostedHttpContext.cs
- SubMenuStyleCollection.cs
- SelectorItemAutomationPeer.cs
- ScaleTransform3D.cs
- precedingquery.cs
- CodeNamespaceCollection.cs
- ModelServiceImpl.cs
- SystemMulticastIPAddressInformation.cs
- PageAsyncTaskManager.cs
- ObjectListSelectEventArgs.cs
- SigningDialog.cs
- SqlCacheDependency.cs
- ConsumerConnectionPoint.cs
- ExcludePathInfo.cs
- RenderTargetBitmap.cs
- Win32.cs