Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / TypeConverterAttribute.cs / 1305376 / 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
- InstanceHandle.cs
- XPathNodeHelper.cs
- FontStyle.cs
- PackagingUtilities.cs
- ScrollBar.cs
- PixelFormat.cs
- NominalTypeEliminator.cs
- HostingEnvironment.cs
- SchemaCollectionCompiler.cs
- TdsValueSetter.cs
- ItemCollection.cs
- _BaseOverlappedAsyncResult.cs
- PersonalizationAdministration.cs
- Pen.cs
- EventLogPermission.cs
- SRGSCompiler.cs
- StringTraceRecord.cs
- ContextDataSource.cs
- Validator.cs
- HelpInfo.cs
- UTF8Encoding.cs
- ResXFileRef.cs
- ClockGroup.cs
- NodeFunctions.cs
- TraceUtility.cs
- HttpCookie.cs
- WebServiceReceive.cs
- ApplicationSecurityManager.cs
- SymmetricKey.cs
- StreamWithDictionary.cs
- QueryUtil.cs
- RankException.cs
- Model3D.cs
- CachedRequestParams.cs
- CompiledXpathExpr.cs
- RestrictedTransactionalPackage.cs
- StylusShape.cs
- EtwTrace.cs
- ChineseLunisolarCalendar.cs
- DmlSqlGenerator.cs
- ObjectSecurity.cs
- latinshape.cs
- BookmarkNameHelper.cs
- CompiledAction.cs
- MarkupCompiler.cs
- RootDesignerSerializerAttribute.cs
- SafeNativeMethodsCLR.cs
- BitStream.cs
- CharacterString.cs
- FormatException.cs
- JumpTask.cs
- DebugTracing.cs
- FtpWebResponse.cs
- Vector3DAnimation.cs
- SafeCryptoHandles.cs
- SimpleLine.cs
- ImageSource.cs
- MatcherBuilder.cs
- PrintPreviewControl.cs
- DataSourceUtil.cs
- RadioButtonStandardAdapter.cs
- Control.cs
- CachedPathData.cs
- VariableModifiersHelper.cs
- ListViewUpdateEventArgs.cs
- CompilationPass2Task.cs
- TrackingConditionCollection.cs
- TrustManagerPromptUI.cs
- InterleavedZipPartStream.cs
- CommandValueSerializer.cs
- StrongNameHelpers.cs
- DeclaredTypeElementCollection.cs
- DictationGrammar.cs
- DataSysAttribute.cs
- DataSourceControl.cs
- SystemSounds.cs
- SchemaManager.cs
- LexicalChunk.cs
- GridViewDeletedEventArgs.cs
- SimplePropertyEntry.cs
- MultiBinding.cs
- DES.cs
- ExpanderAutomationPeer.cs
- IntSecurity.cs
- ControlUtil.cs
- SiteMapProvider.cs
- ProfileInfo.cs
- AnchoredBlock.cs
- TileBrush.cs
- ErrorView.xaml.cs
- ButtonStandardAdapter.cs
- XmlSchemaType.cs
- hresults.cs
- GPRECTF.cs
- PairComparer.cs
- EventLogWatcher.cs
- ClipboardData.cs
- ContentTypeSettingClientMessageFormatter.cs
- StrokeCollection.cs
- CacheDependency.cs