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
- HttpCacheParams.cs
- SpeechRecognitionEngine.cs
- IRCollection.cs
- Decoder.cs
- FlowDocumentPaginator.cs
- RichTextBoxAutomationPeer.cs
- MemberInfoSerializationHolder.cs
- WindowsStatic.cs
- VisualCollection.cs
- CommandValueSerializer.cs
- PartitionResolver.cs
- HttpValueCollection.cs
- ConfigXmlText.cs
- VectorCollection.cs
- XmlRootAttribute.cs
- GestureRecognitionResult.cs
- OpenTypeCommon.cs
- WpfMemberInvoker.cs
- BindingList.cs
- MobilePage.cs
- WebHeaderCollection.cs
- TCPListener.cs
- URIFormatException.cs
- SHA512Managed.cs
- HttpListenerRequestUriBuilder.cs
- FullTextBreakpoint.cs
- CodeGeneratorOptions.cs
- Mappings.cs
- ReflectPropertyDescriptor.cs
- DoubleLinkListEnumerator.cs
- Point3D.cs
- CodeObject.cs
- RegexRunnerFactory.cs
- LinqDataSourceSelectEventArgs.cs
- StylusDevice.cs
- AuthenticationServiceManager.cs
- ConstraintEnumerator.cs
- SerialErrors.cs
- PriorityItem.cs
- ObjectStateEntry.cs
- Light.cs
- BinaryMethodMessage.cs
- BitmapEffectRenderDataResource.cs
- ConditionalAttribute.cs
- RoleManagerModule.cs
- ShortcutKeysEditor.cs
- FontNamesConverter.cs
- ScrollPatternIdentifiers.cs
- QueryOperationResponseOfT.cs
- DataGridRow.cs
- PipeStream.cs
- XmlQueryCardinality.cs
- CheckBoxStandardAdapter.cs
- CollectionDataContract.cs
- DataGridViewCellCollection.cs
- FormClosingEvent.cs
- BaseTemplateParser.cs
- SchemaComplexType.cs
- SchemaMapping.cs
- TextPointerBase.cs
- NativeMethods.cs
- RotateTransform.cs
- SplitContainer.cs
- ReadOnlyDataSourceView.cs
- XmlComment.cs
- BuildProvider.cs
- GenericTextProperties.cs
- SafeNativeMemoryHandle.cs
- FailedToStartupUIException.cs
- PathFigure.cs
- HandleRef.cs
- ImageInfo.cs
- DistributedTransactionPermission.cs
- _SecureChannel.cs
- JumpList.cs
- Inflater.cs
- CodeDOMUtility.cs
- DodSequenceMerge.cs
- WorkflowQueue.cs
- DynamicValidatorEventArgs.cs
- TimersDescriptionAttribute.cs
- VSWCFServiceContractGenerator.cs
- ExtensionWindowHeader.cs
- Transform.cs
- SettingsAttributes.cs
- SpeechEvent.cs
- RectKeyFrameCollection.cs
- CryptographicAttribute.cs
- CompiledRegexRunner.cs
- InstanceKeyNotReadyException.cs
- ComplexPropertyEntry.cs
- ConstructorNeedsTagAttribute.cs
- ObjectToIdCache.cs
- PageWrapper.cs
- ZipPackage.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- SingleStorage.cs
- NamedPermissionSet.cs
- COM2PropertyDescriptor.cs
- InfoCardRSAPKCS1SignatureFormatter.cs