Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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(); } } }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
- MDIWindowDialog.cs
- NodeLabelEditEvent.cs
- SqlDataSourceSelectingEventArgs.cs
- UriParserTemplates.cs
- Matrix3DConverter.cs
- EnumValAlphaComparer.cs
- StatusBarDesigner.cs
- HtmlButton.cs
- ContainerVisual.cs
- UrlMappingsModule.cs
- XPathNodeIterator.cs
- Point3DCollection.cs
- XslException.cs
- DisposableCollectionWrapper.cs
- SqlVisitor.cs
- SqlConnectionFactory.cs
- mediaeventargs.cs
- SqlComparer.cs
- ClosableStream.cs
- itemelement.cs
- LinkTarget.cs
- DropDownList.cs
- RegexCompilationInfo.cs
- Bidi.cs
- PointHitTestResult.cs
- MediaElement.cs
- MissingSatelliteAssemblyException.cs
- PropertyEntry.cs
- SystemColors.cs
- VisemeEventArgs.cs
- OracleConnectionString.cs
- CheckBoxStandardAdapter.cs
- ChangesetResponse.cs
- Visitors.cs
- DocumentReference.cs
- RoleManagerEventArgs.cs
- XmlEntityReference.cs
- CharStorage.cs
- TypedElement.cs
- BitmapEffect.cs
- DataRowExtensions.cs
- Application.cs
- SectionInformation.cs
- SendSecurityHeader.cs
- TextParagraphView.cs
- TraceData.cs
- FrameAutomationPeer.cs
- DetailsViewDeletedEventArgs.cs
- ObservableCollection.cs
- DataObjectEventArgs.cs
- SurrogateSelector.cs
- Color.cs
- ProfileProvider.cs
- EmbeddedMailObjectsCollection.cs
- TcpServerChannel.cs
- COSERVERINFO.cs
- ObjectItemCollection.cs
- XNameConverter.cs
- StrongNameIdentityPermission.cs
- ImageBrush.cs
- QueryCorrelationInitializer.cs
- DataDocumentXPathNavigator.cs
- TextBox.cs
- Point3DAnimation.cs
- PerfService.cs
- CssClassPropertyAttribute.cs
- ByteFacetDescriptionElement.cs
- DataTableExtensions.cs
- ListViewPagedDataSource.cs
- FlowPosition.cs
- IntSecurity.cs
- Int16Storage.cs
- UpdateExpressionVisitor.cs
- QilDataSource.cs
- NumberSubstitution.cs
- StorageEntitySetMapping.cs
- ProxyHwnd.cs
- ResourceReader.cs
- InputProviderSite.cs
- UnmanagedBitmapWrapper.cs
- Semaphore.cs
- InternalDuplexChannelFactory.cs
- HMACSHA1.cs
- IPAddressCollection.cs
- ValidatorCollection.cs
- AccessText.cs
- SchemaCollectionCompiler.cs
- GenericsInstances.cs
- RSAOAEPKeyExchangeDeformatter.cs
- CompModHelpers.cs
- SqlCharStream.cs
- AsyncResult.cs
- UInt32.cs
- ExpressionVisitor.cs
- ConcatQueryOperator.cs
- EdmToObjectNamespaceMap.cs
- Conditional.cs
- ConnectorDragDropGlyph.cs
- HttpHandlerActionCollection.cs
- CachedFontFace.cs