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
- Variant.cs
- Substitution.cs
- ForEachAction.cs
- PagerSettings.cs
- SolidBrush.cs
- DocumentsTrace.cs
- ProfileModule.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- EntitySetDataBindingList.cs
- BrowserCapabilitiesFactory.cs
- ErrorHandlerModule.cs
- XPathNavigatorReader.cs
- WebGetAttribute.cs
- CreateUserWizardStep.cs
- EditorPartChrome.cs
- baseaxisquery.cs
- DbUpdateCommandTree.cs
- ValidatingPropertiesEventArgs.cs
- AssemblyNameProxy.cs
- SplitterEvent.cs
- Journaling.cs
- ImageBrush.cs
- Vector3DCollectionConverter.cs
- IISUnsafeMethods.cs
- XsdBuildProvider.cs
- ImageAutomationPeer.cs
- XpsImageSerializationService.cs
- WindowsFormsDesignerOptionService.cs
- GroupStyle.cs
- CurrentChangingEventManager.cs
- ThrowHelper.cs
- CollectionConverter.cs
- GroupAggregateExpr.cs
- WindowsFormsSectionHandler.cs
- OutgoingWebRequestContext.cs
- StateWorkerRequest.cs
- CleanUpVirtualizedItemEventArgs.cs
- DSACryptoServiceProvider.cs
- AppendHelper.cs
- PropertyGridView.cs
- SqlCacheDependency.cs
- CheckBoxStandardAdapter.cs
- CombinedGeometry.cs
- ListParaClient.cs
- Converter.cs
- TrackBarDesigner.cs
- AbsoluteQuery.cs
- IssuedTokenParametersElement.cs
- GregorianCalendarHelper.cs
- BackgroundFormatInfo.cs
- SHA384Cng.cs
- LinqDataSourceContextData.cs
- SqlCommandBuilder.cs
- ACL.cs
- ListItemCollection.cs
- ImportCatalogPart.cs
- BuildManager.cs
- DataPagerFieldCommandEventArgs.cs
- HostedHttpRequestAsyncResult.cs
- DBPropSet.cs
- XsdDataContractImporter.cs
- MetaColumn.cs
- XmlException.cs
- WebPartTracker.cs
- HostingEnvironmentSection.cs
- StyleCollection.cs
- ButtonStandardAdapter.cs
- PathData.cs
- CompiledIdentityConstraint.cs
- COM2ComponentEditor.cs
- Int32Rect.cs
- Win32.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- MailBnfHelper.cs
- InternalTypeHelper.cs
- PnrpPermission.cs
- StyleXamlTreeBuilder.cs
- UrlMappingCollection.cs
- CommonDialog.cs
- NodeFunctions.cs
- ServiceRoute.cs
- MaterialGroup.cs
- ComponentResourceKey.cs
- FormatException.cs
- WindowsToolbarAsMenu.cs
- XPathDocumentBuilder.cs
- StateRuntime.cs
- IgnoreDeviceFilterElement.cs
- BindingContext.cs
- ToolConsole.cs
- SQLStringStorage.cs
- InfoCardKeyedHashAlgorithm.cs
- ClientRolePrincipal.cs
- SystemUnicastIPAddressInformation.cs
- DateTimeOffsetStorage.cs
- InfoCardCryptoHelper.cs
- BigInt.cs
- XamlSerializationHelper.cs
- VoiceSynthesis.cs
- _SafeNetHandles.cs