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
- ConfigurationLocation.cs
- RequestQueue.cs
- ControlIdConverter.cs
- HandledEventArgs.cs
- DefinitionBase.cs
- EDesignUtil.cs
- LowerCaseStringConverter.cs
- DiagnosticTrace.cs
- MethodImplAttribute.cs
- AssemblyCollection.cs
- BufferedGraphics.cs
- EntitySqlException.cs
- PopupRootAutomationPeer.cs
- KeyConstraint.cs
- OciLobLocator.cs
- OdbcUtils.cs
- CqlGenerator.cs
- XmlWrappingReader.cs
- ClientTargetSection.cs
- PackageDocument.cs
- TypeUtil.cs
- MbpInfo.cs
- MemberDomainMap.cs
- OperationCanceledException.cs
- CodeTypeOfExpression.cs
- SoapIgnoreAttribute.cs
- FixedDSBuilder.cs
- TreeNodeStyle.cs
- XmlAggregates.cs
- ApplicationDirectory.cs
- TextRenderer.cs
- SafeFileMappingHandle.cs
- behaviorssection.cs
- SchemaEntity.cs
- SoapInteropTypes.cs
- RadioButtonBaseAdapter.cs
- MetaChildrenColumn.cs
- XsdBuilder.cs
- MailBnfHelper.cs
- XamlStyleSerializer.cs
- Rfc2898DeriveBytes.cs
- MediaPlayer.cs
- DynamicFilter.cs
- WmlCommandAdapter.cs
- webeventbuffer.cs
- XPathParser.cs
- NoneExcludedImageIndexConverter.cs
- SkipStoryboardToFill.cs
- XXXOnTypeBuilderInstantiation.cs
- HttpStreamMessage.cs
- DesignerSerializationVisibilityAttribute.cs
- ExtensionWindowResizeGrip.cs
- ProtectedProviderSettings.cs
- TreePrinter.cs
- DragEventArgs.cs
- ExtenderControl.cs
- smtpconnection.cs
- DateTimeConstantAttribute.cs
- ScaleTransform.cs
- EntitySet.cs
- MediaPlayer.cs
- FormsAuthenticationEventArgs.cs
- NetSectionGroup.cs
- RepeatInfo.cs
- SchemaElementLookUpTable.cs
- TreeView.cs
- AuthorizationRuleCollection.cs
- XmlSchemaSimpleType.cs
- DiscoveryDocumentSerializer.cs
- Util.cs
- GrowingArray.cs
- _ShellExpression.cs
- HyperLinkDesigner.cs
- StringExpressionSet.cs
- GregorianCalendarHelper.cs
- UnlockInstanceAsyncResult.cs
- MsmqAppDomainProtocolHandler.cs
- OutputCacheProfileCollection.cs
- CodePropertyReferenceExpression.cs
- SystemIcmpV4Statistics.cs
- ToggleButtonAutomationPeer.cs
- TypeSystem.cs
- LinkClickEvent.cs
- QilPatternVisitor.cs
- BindToObject.cs
- SQLMoney.cs
- DropDownList.cs
- TraceContextRecord.cs
- _NestedSingleAsyncResult.cs
- RepeaterItemEventArgs.cs
- ResourceDictionaryCollection.cs
- JoinQueryOperator.cs
- SplitContainer.cs
- BitSet.cs
- CollectionChangeEventArgs.cs
- DateBoldEvent.cs
- TabItemWrapperAutomationPeer.cs
- ListViewCancelEventArgs.cs
- DataSourceConverter.cs
- HtmlGenericControl.cs