Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Serializer / TypeExtensionSerializer.cs / 1305376 / TypeExtensionSerializer.cs
namespace System.Workflow.ComponentModel.Serialization { using System; using System.Xml; using System.Reflection; using System.Workflow.ComponentModel.Design; using System.ComponentModel.Design.Serialization; using System.Text; using System.Diagnostics; using System.ComponentModel; using System.Collections.Generic; #region Class TypeExtensionSerializer internal class TypeExtensionSerializer : MarkupExtensionSerializer { protected override InstanceDescriptor GetInstanceDescriptor(WorkflowMarkupSerializationManager serializationManager, object value) { TypeExtension typeExtension = value as TypeExtension; if (typeExtension == null) throw new ArgumentException(SR.GetString(SR.Error_UnexpectedArgumentType, typeof(TypeExtension).FullName), "value"); if(typeExtension.Type != null) return new InstanceDescriptor(typeof(TypeExtension).GetConstructor(new Type[] { typeof(System.Type) }), new object[] { typeExtension.Type }); return new InstanceDescriptor(typeof(TypeExtension).GetConstructor(new Type[] { typeof(string) }), new object[] { typeExtension.TypeName }); } } #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.Xml; using System.Reflection; using System.Workflow.ComponentModel.Design; using System.ComponentModel.Design.Serialization; using System.Text; using System.Diagnostics; using System.ComponentModel; using System.Collections.Generic; #region Class TypeExtensionSerializer internal class TypeExtensionSerializer : MarkupExtensionSerializer { protected override InstanceDescriptor GetInstanceDescriptor(WorkflowMarkupSerializationManager serializationManager, object value) { TypeExtension typeExtension = value as TypeExtension; if (typeExtension == null) throw new ArgumentException(SR.GetString(SR.Error_UnexpectedArgumentType, typeof(TypeExtension).FullName), "value"); if(typeExtension.Type != null) return new InstanceDescriptor(typeof(TypeExtension).GetConstructor(new Type[] { typeof(System.Type) }), new object[] { typeExtension.Type }); return new InstanceDescriptor(typeof(TypeExtension).GetConstructor(new Type[] { typeof(string) }), new object[] { typeExtension.TypeName }); } } #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
- UpdateCommand.cs
- EditCommandColumn.cs
- DesigntimeLicenseContext.cs
- coordinator.cs
- Variable.cs
- SqlInfoMessageEvent.cs
- Viewport2DVisual3D.cs
- Thumb.cs
- XmlAnyAttributeAttribute.cs
- RectAnimationClockResource.cs
- GeneralTransform.cs
- DoubleAnimationClockResource.cs
- SqlReferenceCollection.cs
- ResourcePart.cs
- SpeechDetectedEventArgs.cs
- RegexTree.cs
- WebPartMinimizeVerb.cs
- MergablePropertyAttribute.cs
- ConfigurationCollectionAttribute.cs
- DataGridViewComponentPropertyGridSite.cs
- XappLauncher.cs
- ListSourceHelper.cs
- LightweightCodeGenerator.cs
- PolyLineSegment.cs
- WmlTextBoxAdapter.cs
- NullableIntAverageAggregationOperator.cs
- DataGridViewImageColumn.cs
- EventKeyword.cs
- querybuilder.cs
- ExceptionValidationRule.cs
- Permission.cs
- AsymmetricSignatureDeformatter.cs
- PointAnimationUsingPath.cs
- XamlTreeBuilderBamlRecordWriter.cs
- TransformerConfigurationWizardBase.cs
- Button.cs
- ParserStreamGeometryContext.cs
- DesignTableCollection.cs
- _LocalDataStore.cs
- SymmetricKeyWrap.cs
- FileDialogCustomPlace.cs
- SqlComparer.cs
- DiagnosticsConfigurationHandler.cs
- ClonableStack.cs
- XmlElementList.cs
- XmlDataSource.cs
- HttpHandlerActionCollection.cs
- VirtualPathUtility.cs
- PathFigure.cs
- As.cs
- PropertyKey.cs
- AspNetHostingPermission.cs
- MultipleViewPattern.cs
- ArrayWithOffset.cs
- ForceCopyBuildProvider.cs
- DataContext.cs
- CrossAppDomainChannel.cs
- HtmlInputReset.cs
- ModifierKeysValueSerializer.cs
- MaterialCollection.cs
- SqlCrossApplyToCrossJoin.cs
- M3DUtil.cs
- CompositeDesignerAccessibleObject.cs
- AbstractDataSvcMapFileLoader.cs
- EmbossBitmapEffect.cs
- Vector3DAnimation.cs
- BaseParser.cs
- WeakKeyDictionary.cs
- InternalDispatchObject.cs
- XmlFileEditor.cs
- HybridDictionary.cs
- Token.cs
- PinProtectionHelper.cs
- FusionWrap.cs
- SessionStateItemCollection.cs
- returneventsaver.cs
- NetMsmqSecurity.cs
- ScrollChangedEventArgs.cs
- Win32SafeHandles.cs
- PagerStyle.cs
- CodeTypeParameterCollection.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- CommonProperties.cs
- ConnectionManagementSection.cs
- IssuedTokensHeader.cs
- TraceUtility.cs
- XmlAttributeProperties.cs
- OutOfMemoryException.cs
- StructuralObject.cs
- HttpListenerRequest.cs
- TableLayoutSettingsTypeConverter.cs
- ConfigXmlAttribute.cs
- StringValidator.cs
- ArgumentValueSerializer.cs
- DataReceivedEventArgs.cs
- IfAction.cs
- SqlTypesSchemaImporter.cs
- TagPrefixCollection.cs
- CodeNamespace.cs
- Helpers.cs