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
- TextContainerChangedEventArgs.cs
- objectresult_tresulttype.cs
- DesignerAttribute.cs
- SocketException.cs
- StreamBodyWriter.cs
- SystemNetHelpers.cs
- QilStrConcatenator.cs
- ListMarkerLine.cs
- XmlTextEncoder.cs
- Site.cs
- XmlSchemaDatatype.cs
- EntityCollection.cs
- RegisteredScript.cs
- GridPatternIdentifiers.cs
- DragDrop.cs
- BoolLiteral.cs
- GACIdentityPermission.cs
- DBSchemaRow.cs
- DataTablePropertyDescriptor.cs
- FixUpCollection.cs
- SQLByte.cs
- SelectionEditor.cs
- ConnectionStringSettingsCollection.cs
- CachedPathData.cs
- EmptyCollection.cs
- CheckBoxAutomationPeer.cs
- DocumentScope.cs
- ConstantCheck.cs
- KeySplineConverter.cs
- LayeredChannelFactory.cs
- RawStylusInputCustomDataList.cs
- _NetworkingPerfCounters.cs
- CacheChildrenQuery.cs
- PeerEndPoint.cs
- AppearanceEditorPart.cs
- Parameter.cs
- TypeNameConverter.cs
- ProfileManager.cs
- StringPropertyBuilder.cs
- PointLightBase.cs
- ProviderConnectionPointCollection.cs
- Serializer.cs
- FontCacheLogic.cs
- ListViewItemMouseHoverEvent.cs
- EntityDesignerDataSourceView.cs
- WebHttpSecurity.cs
- RtType.cs
- XmlSortKey.cs
- TableRowCollection.cs
- ActivityMarkupSerializer.cs
- PerfService.cs
- CrossAppDomainChannel.cs
- HierarchicalDataBoundControl.cs
- GridViewCommandEventArgs.cs
- SoapExtensionStream.cs
- FileRecordSequenceCompletedAsyncResult.cs
- MessagePartDescription.cs
- WeakReference.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- BaseValidator.cs
- PageRequestManager.cs
- PointAnimationClockResource.cs
- PasswordTextNavigator.cs
- AnyReturnReader.cs
- InheritanceAttribute.cs
- Fonts.cs
- WindowsRegion.cs
- DictionaryBase.cs
- DesignerValidationSummaryAdapter.cs
- SecurityMode.cs
- SHA512Managed.cs
- InputLangChangeEvent.cs
- Panel.cs
- ColumnHeader.cs
- PointAnimationBase.cs
- DataGridViewHeaderCell.cs
- JavascriptCallbackMessageInspector.cs
- DesignOnlyAttribute.cs
- StylusPointPropertyInfoDefaults.cs
- ConnectionsZone.cs
- RichTextBoxConstants.cs
- ImageButton.cs
- SqlPersonalizationProvider.cs
- COM2AboutBoxPropertyDescriptor.cs
- RowUpdatingEventArgs.cs
- Registry.cs
- AbsoluteQuery.cs
- NativeMethods.cs
- HttpListenerPrefixCollection.cs
- EventlogProvider.cs
- Rules.cs
- RIPEMD160Managed.cs
- TextViewDesigner.cs
- QilTypeChecker.cs
- ProxyElement.cs
- RecognitionEventArgs.cs
- Color.cs
- DeobfuscatingStream.cs
- CroppedBitmap.cs
- LZCodec.cs