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
- MimeTypeAttribute.cs
- PointLightBase.cs
- COSERVERINFO.cs
- SqlBinder.cs
- NameValueSectionHandler.cs
- HiddenFieldPageStatePersister.cs
- TextShapeableCharacters.cs
- listitem.cs
- ServiceDesigner.cs
- GridViewEditEventArgs.cs
- ComplexLine.cs
- FormsAuthenticationModule.cs
- MenuItemCollection.cs
- CodeCatchClauseCollection.cs
- StrictAndMessageFilter.cs
- BaseTreeIterator.cs
- ToolboxItem.cs
- PageVisual.cs
- CodeDirectionExpression.cs
- X509Certificate2.cs
- DefaultMergeHelper.cs
- AccessibleObject.cs
- SyndicationDeserializer.cs
- X509ChainElement.cs
- EntitySetDataBindingList.cs
- FontNameConverter.cs
- RewritingProcessor.cs
- ActiveXHelper.cs
- HMACSHA1.cs
- RegexReplacement.cs
- TabletCollection.cs
- EpmSourcePathSegment.cs
- CacheVirtualItemsEvent.cs
- XmlTypeMapping.cs
- ComplexTypeEmitter.cs
- RemotingService.cs
- JsonServiceDocumentSerializer.cs
- Section.cs
- DataSourceHelper.cs
- DerivedKeyCachingSecurityTokenSerializer.cs
- followingsibling.cs
- ADMembershipUser.cs
- SingleResultAttribute.cs
- PaperSize.cs
- DataException.cs
- WindowsSlider.cs
- DocumentOrderQuery.cs
- XmlAttribute.cs
- KeyedCollection.cs
- CircleEase.cs
- Int16KeyFrameCollection.cs
- HTTPNotFoundHandler.cs
- SystemIcmpV4Statistics.cs
- TraceHandler.cs
- HighlightVisual.cs
- AggregateNode.cs
- XPathMessageFilter.cs
- OracleDataAdapter.cs
- HttpStreamXmlDictionaryWriter.cs
- DatagridviewDisplayedBandsData.cs
- WindowsStatusBar.cs
- NavigationFailedEventArgs.cs
- ArrayWithOffset.cs
- NullableLongAverageAggregationOperator.cs
- KeyEventArgs.cs
- PublisherIdentityPermission.cs
- ActiveXContainer.cs
- ActivityDesigner.cs
- CrossContextChannel.cs
- WebControlsSection.cs
- TraceRecords.cs
- Formatter.cs
- Certificate.cs
- Hyperlink.cs
- MD5CryptoServiceProvider.cs
- UserUseLicenseDictionaryLoader.cs
- BamlTreeMap.cs
- WebEventTraceProvider.cs
- WebPartUserCapability.cs
- XmlSchemaAnnotated.cs
- NumericUpDownAcceleration.cs
- EventPrivateKey.cs
- Int64AnimationUsingKeyFrames.cs
- TdsParserStaticMethods.cs
- HealthMonitoringSection.cs
- XmlDeclaration.cs
- DynamicQueryableWrapper.cs
- CopyOfAction.cs
- IndexOutOfRangeException.cs
- NativeMsmqMessage.cs
- ClassDataContract.cs
- EncryptedKey.cs
- Highlights.cs
- SqlParameterCollection.cs
- TextShapeableCharacters.cs
- AmbientLight.cs
- ScrollChrome.cs
- ProxyWebPart.cs
- LineServicesCallbacks.cs
- ReadOnlyCollection.cs