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
- Qualifier.cs
- UserPreferenceChangedEventArgs.cs
- XPathSelectionIterator.cs
- StylusPoint.cs
- CompilerParameters.cs
- SchemaTableColumn.cs
- TraceUtils.cs
- XmlQueryOutput.cs
- EditorZone.cs
- CodeComment.cs
- IntSecurity.cs
- JoinCqlBlock.cs
- IPAddressCollection.cs
- TextBoxLine.cs
- ComponentSerializationService.cs
- XmlSerializerVersionAttribute.cs
- ClientScriptManager.cs
- VerticalAlignConverter.cs
- SoapSchemaMember.cs
- DataSourceExpressionCollection.cs
- AsmxEndpointPickerExtension.cs
- MarkupExtensionSerializer.cs
- UnaryNode.cs
- keycontainerpermission.cs
- AppDomainInfo.cs
- MetadataPropertyAttribute.cs
- SessionEndedEventArgs.cs
- _HTTPDateParse.cs
- ProxyWebPartManagerDesigner.cs
- LoginView.cs
- XpsDocument.cs
- UrlPath.cs
- ProgressiveCrcCalculatingStream.cs
- LocatorGroup.cs
- OdbcConnectionStringbuilder.cs
- SecuritySessionSecurityTokenProvider.cs
- HScrollBar.cs
- SmtpReplyReaderFactory.cs
- ClientTargetSection.cs
- UnsafeNativeMethods.cs
- XsltSettings.cs
- HebrewNumber.cs
- SQLCharsStorage.cs
- XmlSchemaComplexContentRestriction.cs
- AutoGeneratedField.cs
- SiteMapHierarchicalDataSourceView.cs
- SiteMapNodeCollection.cs
- securitymgrsite.cs
- FileChangesMonitor.cs
- SineEase.cs
- ProcessInputEventArgs.cs
- StrokeCollection2.cs
- MapPathBasedVirtualPathProvider.cs
- SectionRecord.cs
- XmlSerializerFactory.cs
- StrokeIntersection.cs
- WebPartDescription.cs
- SerializationEventsCache.cs
- ScriptControlDescriptor.cs
- XmlWrappingWriter.cs
- TraceEventCache.cs
- TaiwanLunisolarCalendar.cs
- ValidationResult.cs
- Pen.cs
- ModifiableIteratorCollection.cs
- ProcessProtocolHandler.cs
- SemanticTag.cs
- SqlVisitor.cs
- StorageComplexPropertyMapping.cs
- Adorner.cs
- MetaModel.cs
- WebPartCollection.cs
- RijndaelManagedTransform.cs
- ToolStripContainerDesigner.cs
- StringResourceManager.cs
- ArgumentOutOfRangeException.cs
- CacheManager.cs
- ScrollBar.cs
- CodeThrowExceptionStatement.cs
- NullableDoubleAverageAggregationOperator.cs
- SoapObjectWriter.cs
- FormViewInsertEventArgs.cs
- XsdValidatingReader.cs
- SiteMembershipCondition.cs
- Html32TextWriter.cs
- COM2ExtendedBrowsingHandler.cs
- BasicHttpSecurity.cs
- MD5.cs
- TextContainer.cs
- CalendarDateRangeChangingEventArgs.cs
- InstallerTypeAttribute.cs
- SafeCoTaskMem.cs
- InputProcessorProfilesLoader.cs
- FocusManager.cs
- AssemblyHash.cs
- TTSEngineTypes.cs
- ThemeInfoAttribute.cs
- HTMLTagNameToTypeMapper.cs
- OdbcErrorCollection.cs
- HGlobalSafeHandle.cs