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
- EdmScalarPropertyAttribute.cs
- ConvertTextFrag.cs
- SystemSounds.cs
- DocumentOrderQuery.cs
- EntityDataSourceDataSelectionPanel.cs
- HttpCachePolicy.cs
- Transform3DGroup.cs
- HostedAspNetEnvironment.cs
- XmlSchemaAppInfo.cs
- SerialStream.cs
- IRCollection.cs
- ToolStripDropDownDesigner.cs
- TraceData.cs
- PointCollection.cs
- PreApplicationStartMethodAttribute.cs
- CheckBox.cs
- CodeEventReferenceExpression.cs
- ClientData.cs
- PropertyRef.cs
- ValueType.cs
- ConfigurationPropertyCollection.cs
- OLEDB_Enum.cs
- ShapeTypeface.cs
- XsdBuildProvider.cs
- GregorianCalendar.cs
- View.cs
- RadioButtonStandardAdapter.cs
- SqlMethodAttribute.cs
- CodeMemberEvent.cs
- AuthorizationRule.cs
- X509Certificate2.cs
- DBDataPermissionAttribute.cs
- ControlBindingsCollection.cs
- Variant.cs
- CalendarTable.cs
- ScrollChrome.cs
- DefaultPropertyAttribute.cs
- RuleSetReference.cs
- DataMemberListEditor.cs
- WinEventQueueItem.cs
- ConfigsHelper.cs
- Listbox.cs
- DefinitionBase.cs
- MediaContextNotificationWindow.cs
- ListenerHandler.cs
- HiddenFieldDesigner.cs
- ApplicationManager.cs
- ItemCheckedEvent.cs
- ComPlusInstanceContextInitializer.cs
- AccessViolationException.cs
- ContentType.cs
- ImportContext.cs
- ContainerParaClient.cs
- safex509handles.cs
- SoapHeaderAttribute.cs
- FileUpload.cs
- WinFormsSpinner.cs
- XmlResolver.cs
- Canvas.cs
- PrintingPermissionAttribute.cs
- InitiatorSessionSymmetricMessageSecurityProtocol.cs
- SqlExpander.cs
- ComplexType.cs
- XmlSerializationGeneratedCode.cs
- ExpressionNode.cs
- XmlValidatingReader.cs
- ServiceDescription.cs
- DataBindingHandlerAttribute.cs
- RootContext.cs
- ShapeTypeface.cs
- IssuanceTokenProviderBase.cs
- HwndTarget.cs
- SchemaAttDef.cs
- TypeUtil.cs
- FontEmbeddingManager.cs
- MergeFailedEvent.cs
- InstancePersistenceException.cs
- EntityContainer.cs
- AlternateViewCollection.cs
- Int64Animation.cs
- DeploymentSection.cs
- DeclarationUpdate.cs
- Lease.cs
- PathFigureCollection.cs
- BuilderPropertyEntry.cs
- RuntimeConfig.cs
- TextProperties.cs
- TextOnlyOutput.cs
- xamlnodes.cs
- SqlAggregateChecker.cs
- SecurityTokenTypes.cs
- RulePatternOps.cs
- TreeNodeMouseHoverEvent.cs
- SimpleBitVector32.cs
- DoubleKeyFrameCollection.cs
- IsolatedStorageFilePermission.cs
- SerialStream.cs
- ParallelForEach.cs
- AdapterDictionary.cs
- APCustomTypeDescriptor.cs