Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / CompMod / System / ComponentModel / TypeConverterAttribute.cs / 1 / TypeConverterAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System.Diagnostics; using System.Globalization; using System.Runtime.Serialization.Formatters; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.All)] public sealed class TypeConverterAttribute : Attribute { private string typeName; ///Specifies what type to use as /// a converter for the object /// this /// attribute is bound to. This class cannot /// be inherited. ////// public static readonly TypeConverterAttribute Default = new TypeConverterAttribute(); ///Specifies the type to use as /// a converter for the object this attribute is bound to. This /// ///field is read-only. /// public TypeConverterAttribute() { this.typeName = string.Empty; } ////// Initializes a new instance of the ///class with the /// default type converter, which /// is an /// empty string (""). /// /// public TypeConverterAttribute(Type type) { this.typeName = type.AssemblyQualifiedName; } ///Initializes a new instance of the ///class, using /// the specified type as the data converter for the object this attribute /// is bound /// to. /// public TypeConverterAttribute(string typeName) { string temp = typeName.ToUpper(CultureInfo.InvariantCulture); Debug.Assert(temp.IndexOf(".DLL") == -1, "Came across: " + typeName + " . Please remove the .dll extension"); this.typeName = typeName; } ///Initializes a new instance of the ///class, using /// the specified type name as the data converter for the object this attribute is bound to. /// public string ConverterTypeName { get { return typeName; } } public override bool Equals(object obj) { TypeConverterAttribute other = obj as TypeConverterAttribute; return (other != null) && other.ConverterTypeName == typeName; } public override int GetHashCode() { return typeName.GetHashCode(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //Gets the fully qualified type name of the ////// to use as a converter for the object this attribute /// is bound to. // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System.Diagnostics; using System.Globalization; using System.Runtime.Serialization.Formatters; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.All)] public sealed class TypeConverterAttribute : Attribute { private string typeName; ///Specifies what type to use as /// a converter for the object /// this /// attribute is bound to. This class cannot /// be inherited. ////// public static readonly TypeConverterAttribute Default = new TypeConverterAttribute(); ///Specifies the type to use as /// a converter for the object this attribute is bound to. This /// ///field is read-only. /// public TypeConverterAttribute() { this.typeName = string.Empty; } ////// Initializes a new instance of the ///class with the /// default type converter, which /// is an /// empty string (""). /// /// public TypeConverterAttribute(Type type) { this.typeName = type.AssemblyQualifiedName; } ///Initializes a new instance of the ///class, using /// the specified type as the data converter for the object this attribute /// is bound /// to. /// public TypeConverterAttribute(string typeName) { string temp = typeName.ToUpper(CultureInfo.InvariantCulture); Debug.Assert(temp.IndexOf(".DLL") == -1, "Came across: " + typeName + " . Please remove the .dll extension"); this.typeName = typeName; } ///Initializes a new instance of the ///class, using /// the specified type name as the data converter for the object this attribute is bound to. /// public string ConverterTypeName { get { return typeName; } } public override bool Equals(object obj) { TypeConverterAttribute other = obj as TypeConverterAttribute; return (other != null) && other.ConverterTypeName == typeName; } public override int GetHashCode() { return typeName.GetHashCode(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.Gets the fully qualified type name of the ////// to use as a converter for the object this attribute /// is bound to.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ImageClickEventArgs.cs
- TableLayoutColumnStyleCollection.cs
- BufferedReadStream.cs
- InvalidDocumentContentsException.cs
- ThemeableAttribute.cs
- SoapSchemaMember.cs
- DbTypeMap.cs
- MatrixCamera.cs
- PropertyPath.cs
- TypeBuilderInstantiation.cs
- RefExpr.cs
- DesignOnlyAttribute.cs
- SerializationObjectManager.cs
- SynchronizedInputHelper.cs
- BitmapPalettes.cs
- VectorKeyFrameCollection.cs
- JsonReaderWriterFactory.cs
- GlyphRunDrawing.cs
- XmlQueryContext.cs
- HttpFileCollectionWrapper.cs
- GridEntryCollection.cs
- BeginEvent.cs
- ToolStripDropTargetManager.cs
- CustomGrammar.cs
- BindingSourceDesigner.cs
- GenerateDerivedKeyRequest.cs
- TriggerBase.cs
- HttpTransportSecurity.cs
- Filter.cs
- ViewCellSlot.cs
- DataObjectMethodAttribute.cs
- IncrementalReadDecoders.cs
- ReliableChannelFactory.cs
- OleDbRowUpdatedEvent.cs
- BaseEntityWrapper.cs
- ValidationErrorInfo.cs
- SvcMapFileSerializer.cs
- ToolStripRenderer.cs
- EventArgs.cs
- BamlRecordWriter.cs
- WebDisplayNameAttribute.cs
- IPEndPointCollection.cs
- TagPrefixCollection.cs
- AdCreatedEventArgs.cs
- GcHandle.cs
- EndpointAddressMessageFilterTable.cs
- ContainerParagraph.cs
- PrimitiveXmlSerializers.cs
- HyperLinkStyle.cs
- UIElementIsland.cs
- BindingsCollection.cs
- securestring.cs
- CodeStatementCollection.cs
- CodeIdentifiers.cs
- HtmlControl.cs
- OverlappedAsyncResult.cs
- CommonObjectSecurity.cs
- RangeContentEnumerator.cs
- FilterQueryOptionExpression.cs
- RemoteWebConfigurationHost.cs
- HierarchicalDataBoundControlAdapter.cs
- ThreadInterruptedException.cs
- DataGridColumnCollection.cs
- XmlILIndex.cs
- SelectionWordBreaker.cs
- CompositionAdorner.cs
- IUnknownConstantAttribute.cs
- TreeViewEvent.cs
- CodeArrayCreateExpression.cs
- AbstractDataSvcMapFileLoader.cs
- ReliableOutputSessionChannel.cs
- GenericWebPart.cs
- CryptoKeySecurity.cs
- XmlReflectionMember.cs
- DetailsViewUpdatedEventArgs.cs
- TraceData.cs
- PerformanceCounterManager.cs
- OutOfProcStateClientManager.cs
- ObjectListGeneralPage.cs
- IdentityNotMappedException.cs
- GridViewCancelEditEventArgs.cs
- ResourceDisplayNameAttribute.cs
- NullableConverter.cs
- dbenumerator.cs
- EntityDataSourceUtil.cs
- SecurityTokenResolver.cs
- DocumentGridPage.cs
- SqlInternalConnectionSmi.cs
- MetaTableHelper.cs
- TdsParserStateObject.cs
- ErasingStroke.cs
- ConfigXmlDocument.cs
- DbExpressionVisitor.cs
- ConnectionsZone.cs
- AutomationElementIdentifiers.cs
- SignatureHelper.cs
- EventHandlersDesigner.cs
- TemplateBindingExtensionConverter.cs
- OutputCacheSection.cs
- HwndProxyElementProvider.cs