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
- Knowncolors.cs
- HitTestWithPointDrawingContextWalker.cs
- ReadOnlyTernaryTree.cs
- ListViewSortEventArgs.cs
- ProcessModule.cs
- ClientTargetSection.cs
- SimplePropertyEntry.cs
- WeakReference.cs
- BindingWorker.cs
- WebPartMenuStyle.cs
- HtmlElement.cs
- WebPartDeleteVerb.cs
- SqlProfileProvider.cs
- Tag.cs
- XmlEntityReference.cs
- StylusCollection.cs
- GridViewAutoFormat.cs
- ArrayElementGridEntry.cs
- DbDataReader.cs
- RefreshPropertiesAttribute.cs
- SoapFault.cs
- PrivilegedConfigurationManager.cs
- TemplateInstanceAttribute.cs
- ConfigXmlText.cs
- UTF32Encoding.cs
- DecoratedNameAttribute.cs
- GeneratedView.cs
- MemoryFailPoint.cs
- CapacityStreamGeometryContext.cs
- ObjectContextServiceProvider.cs
- InsufficientMemoryException.cs
- xmlfixedPageInfo.cs
- LoginName.cs
- arclist.cs
- SqlDataSourceConfigureSortForm.cs
- XmlDocumentType.cs
- DocumentXPathNavigator.cs
- StaticTextPointer.cs
- SamlSerializer.cs
- PrintPreviewControl.cs
- SupportsEventValidationAttribute.cs
- DependencyProperty.cs
- ThreadSafeList.cs
- SafeSecurityHandles.cs
- MultitargetUtil.cs
- SegmentInfo.cs
- RootContext.cs
- SelectorItemAutomationPeer.cs
- SecuritySessionSecurityTokenProvider.cs
- DirectoryGroupQuery.cs
- SqlFormatter.cs
- MouseBinding.cs
- CodeVariableReferenceExpression.cs
- TextMetrics.cs
- BinaryCommonClasses.cs
- LinkedList.cs
- ListComponentEditorPage.cs
- FrameworkEventSource.cs
- AnalyzedTree.cs
- ReversePositionQuery.cs
- StagingAreaInputItem.cs
- DispatcherObject.cs
- InvalidAsynchronousStateException.cs
- AccessDataSourceView.cs
- EntityDataSourceMemberPath.cs
- UIPermission.cs
- DataRowChangeEvent.cs
- HttpWebResponse.cs
- ColumnWidthChangedEvent.cs
- SmtpNetworkElement.cs
- WasNotInstalledException.cs
- _BasicClient.cs
- SerializationFieldInfo.cs
- BrushConverter.cs
- XPathNode.cs
- ListBox.cs
- RemoteEndpointMessageProperty.cs
- GraphicsContext.cs
- StyleCollectionEditor.cs
- ContextQuery.cs
- LoginNameDesigner.cs
- LinkClickEvent.cs
- Vector3DValueSerializer.cs
- ImageAttributes.cs
- sqlnorm.cs
- BrowsableAttribute.cs
- UIElementHelper.cs
- SmiEventSink_DeferedProcessing.cs
- UrlMappingsSection.cs
- DeviceContext2.cs
- HttpCacheParams.cs
- SafeProcessHandle.cs
- CryptoApi.cs
- ListControl.cs
- PkcsUtils.cs
- EmptyEnumerator.cs
- DotExpr.cs
- IUnknownConstantAttribute.cs
- CryptoConfig.cs
- XmlCompatibilityReader.cs