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
- DataGridCaption.cs
- ManagementPath.cs
- ResourcePermissionBaseEntry.cs
- DispatchWrapper.cs
- SqlGenericUtil.cs
- CompiledIdentityConstraint.cs
- OleDbError.cs
- EmptyQuery.cs
- CheckedPointers.cs
- AdPostCacheSubstitution.cs
- DropSource.cs
- FreeFormDesigner.cs
- DataMemberAttribute.cs
- BamlRecordWriter.cs
- ScriptReferenceBase.cs
- NotFiniteNumberException.cs
- UserControl.cs
- FacetEnabledSchemaElement.cs
- DurationConverter.cs
- PopupRoot.cs
- SortedList.cs
- ArgumentReference.cs
- ToolTipService.cs
- TextBoxBase.cs
- ReadOnlyHierarchicalDataSource.cs
- ManifestBasedResourceGroveler.cs
- StaticTextPointer.cs
- SurrogateSelector.cs
- WindowsAuthenticationModule.cs
- InputLangChangeEvent.cs
- StyleSheetDesigner.cs
- OraclePermissionAttribute.cs
- VerificationException.cs
- SessionIDManager.cs
- CredentialCache.cs
- ButtonChrome.cs
- SqlConnectionPoolGroupProviderInfo.cs
- CheckBoxDesigner.cs
- EntityPropertyMappingAttribute.cs
- COAUTHINFO.cs
- CaseDesigner.xaml.cs
- ColorConvertedBitmapExtension.cs
- CodeParameterDeclarationExpression.cs
- ContentWrapperAttribute.cs
- FloaterBaseParagraph.cs
- ListItemConverter.cs
- ServiceParser.cs
- TabPage.cs
- OdbcRowUpdatingEvent.cs
- X509WindowsSecurityToken.cs
- ipaddressinformationcollection.cs
- Restrictions.cs
- SqlInternalConnection.cs
- ViewValidator.cs
- DataGridViewButtonColumn.cs
- _DomainName.cs
- RuntimeTrackingProfile.cs
- CodeConditionStatement.cs
- MostlySingletonList.cs
- TextStore.cs
- StreamResourceInfo.cs
- CompilerError.cs
- ImageAttributes.cs
- EventHandlerList.cs
- TableLayoutSettings.cs
- SqlSelectStatement.cs
- ChangeTracker.cs
- SerializationUtilities.cs
- XPathAncestorIterator.cs
- AlternateView.cs
- ToolStripPanelRenderEventArgs.cs
- TextContainerChangedEventArgs.cs
- CssClassPropertyAttribute.cs
- OleCmdHelper.cs
- ConnectionStringSettings.cs
- Style.cs
- XPathArrayIterator.cs
- ArglessEventHandlerProxy.cs
- WebPartZoneBase.cs
- Rule.cs
- IntellisenseTextBox.designer.cs
- ResourceDescriptionAttribute.cs
- _Rfc2616CacheValidators.cs
- ExpressionBuilder.cs
- CategoryAttribute.cs
- XsdBuildProvider.cs
- TextEditorLists.cs
- LocatorGroup.cs
- FontStyles.cs
- DataPager.cs
- GZipDecoder.cs
- SortDescriptionCollection.cs
- DynamicMethod.cs
- Roles.cs
- PropertyTab.cs
- Atom10FormatterFactory.cs
- DocumentPageTextView.cs
- MimeFormatter.cs
- CodeDOMUtility.cs
- NameSpaceExtractor.cs