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
- VBCodeProvider.cs
- XMLDiffLoader.cs
- TextEmbeddedObject.cs
- ConditionCollection.cs
- SmtpDigestAuthenticationModule.cs
- SerializableAuthorizationContext.cs
- SR.cs
- ScrollItemProviderWrapper.cs
- XmlSchemaAll.cs
- HttpRequest.cs
- Button.cs
- SoapUnknownHeader.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- ApplicationServiceHelper.cs
- IDReferencePropertyAttribute.cs
- PropertyGeneratedEventArgs.cs
- DeviceContext.cs
- PropertyChangedEventArgs.cs
- AsmxEndpointPickerExtension.cs
- ClientUtils.cs
- Transform.cs
- BaseContextMenu.cs
- MultipleViewPatternIdentifiers.cs
- ChildTable.cs
- HtmlImage.cs
- DescendantQuery.cs
- ErrorHandler.cs
- GridPattern.cs
- Method.cs
- WebGetAttribute.cs
- FilterElement.cs
- ReceiveCompletedEventArgs.cs
- Events.cs
- ExpandCollapsePattern.cs
- MgmtConfigurationRecord.cs
- StronglyTypedResourceBuilder.cs
- VirtualPathUtility.cs
- BufferModeSettings.cs
- RotateTransform3D.cs
- XmlLanguageConverter.cs
- ConfigXmlAttribute.cs
- xmlfixedPageInfo.cs
- DiscoveryEndpoint.cs
- Int32AnimationBase.cs
- ScrollChrome.cs
- ListSortDescription.cs
- SessionStateUtil.cs
- SecurityTokenException.cs
- XNodeNavigator.cs
- AsymmetricSignatureFormatter.cs
- StateManagedCollection.cs
- ChannelSinkStacks.cs
- Point3DAnimation.cs
- ProxyManager.cs
- CodeDomSerializerException.cs
- GridViewRowEventArgs.cs
- TraceInternal.cs
- CompiledQueryCacheEntry.cs
- CharacterBuffer.cs
- DocumentViewerAutomationPeer.cs
- BindingExpression.cs
- EventSourceCreationData.cs
- VerticalAlignConverter.cs
- CodeMemberField.cs
- ProtectedUri.cs
- ClientScriptManagerWrapper.cs
- ConstraintEnumerator.cs
- KeyValueInternalCollection.cs
- DataGridViewCellStyleChangedEventArgs.cs
- InstanceNotFoundException.cs
- BufferManager.cs
- TrustManager.cs
- ClosableStream.cs
- MiniLockedBorderGlyph.cs
- ApplicationContext.cs
- BitmapSource.cs
- ValidationHelper.cs
- HtmlLiteralTextAdapter.cs
- WebServiceMethodData.cs
- _HeaderInfo.cs
- ToolboxItemCollection.cs
- StructuredTypeInfo.cs
- GenericIdentity.cs
- ContentTextAutomationPeer.cs
- SqlMetaData.cs
- SimpleMailWebEventProvider.cs
- ValueType.cs
- MasterPage.cs
- SiteMap.cs
- COM2ExtendedUITypeEditor.cs
- TraceLevelStore.cs
- BitmapPalettes.cs
- XPathAncestorQuery.cs
- XmlSerializer.cs
- FlowDocument.cs
- OpenTypeLayoutCache.cs
- RankException.cs
- GatewayDefinition.cs
- ChangePassword.cs
- SynchronizedPool.cs