Code:
/ FX-1434 / FX-1434 / 1.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
- PrefixQName.cs
- TextTreeText.cs
- ConfigurationPropertyCollection.cs
- CalculatedColumn.cs
- AssemblyResourceLoader.cs
- ComplexType.cs
- TraceSwitch.cs
- DeflateStream.cs
- TableCell.cs
- assertwrapper.cs
- TextTreeUndo.cs
- TransformGroup.cs
- ObjectManager.cs
- BindingContext.cs
- InfoCardRequestException.cs
- Color.cs
- PlacementWorkspace.cs
- EmptyStringExpandableObjectConverter.cs
- NameValueCache.cs
- ExclusiveHandle.cs
- HttpChannelHelper.cs
- DesignerProperties.cs
- SqlTriggerContext.cs
- ActivityMarkupSerializer.cs
- X509WindowsSecurityToken.cs
- PeerToPeerException.cs
- DefaultTextStoreTextComposition.cs
- SiteMapNodeItemEventArgs.cs
- X509ClientCertificateAuthentication.cs
- BadImageFormatException.cs
- CodeTypeDeclarationCollection.cs
- DuplicateWaitObjectException.cs
- Menu.cs
- ApplicationSettingsBase.cs
- MailAddressCollection.cs
- TemplateField.cs
- DataGridRowAutomationPeer.cs
- SemanticAnalyzer.cs
- CompletedAsyncResult.cs
- SizeValueSerializer.cs
- ResourceProviderFactory.cs
- WebBrowserNavigatedEventHandler.cs
- ServiceReference.cs
- ColumnHeader.cs
- FrameworkPropertyMetadata.cs
- MdiWindowListItemConverter.cs
- WebPartRestoreVerb.cs
- Symbol.cs
- Vector3DAnimationUsingKeyFrames.cs
- EqualityComparer.cs
- QilStrConcat.cs
- XamlGridLengthSerializer.cs
- VirtualDirectoryMappingCollection.cs
- SegmentInfo.cs
- UnsafeNativeMethods.cs
- IntegerValidatorAttribute.cs
- SqlInternalConnection.cs
- InputScopeNameConverter.cs
- DataIdProcessor.cs
- Queue.cs
- Compilation.cs
- EdmProviderManifest.cs
- NativeCppClassAttribute.cs
- ExecutionContext.cs
- EntityAdapter.cs
- ApplicationManager.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- Publisher.cs
- EndPoint.cs
- ExtensionQuery.cs
- UrlPath.cs
- UriParserTemplates.cs
- CompilationUnit.cs
- XPathItem.cs
- DESCryptoServiceProvider.cs
- DispatcherObject.cs
- AsyncDataRequest.cs
- PublishLicense.cs
- BlockCollection.cs
- UpdateCompiler.cs
- BypassElement.cs
- DnsElement.cs
- RegexFCD.cs
- TreeViewImageIndexConverter.cs
- SponsorHelper.cs
- ServiceSecurityAuditBehavior.cs
- CompositeActivityMarkupSerializer.cs
- PrintPreviewGraphics.cs
- ChildTable.cs
- DmlSqlGenerator.cs
- MemberDomainMap.cs
- ResourceDescriptionAttribute.cs
- MimeBasePart.cs
- BitmapEffectDrawingContextState.cs
- printdlgexmarshaler.cs
- PropertyPushdownHelper.cs
- PointLight.cs
- AmbientValueAttribute.cs
- DataGridViewDataConnection.cs
- EastAsianLunisolarCalendar.cs