Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //Gets the fully qualified type name of the ////// to use as a converter for the object this attribute /// is bound to. // 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(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.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
- Themes.cs
- ToolBarOverflowPanel.cs
- SpeechEvent.cs
- SortAction.cs
- PrimitiveType.cs
- Rss20ItemFormatter.cs
- XhtmlBasicSelectionListAdapter.cs
- StatusBar.cs
- TTSEngineProxy.cs
- HttpContextWrapper.cs
- TableSectionStyle.cs
- StylusPointDescription.cs
- SchemaNamespaceManager.cs
- SiteMapDataSource.cs
- ReachDocumentSequenceSerializerAsync.cs
- OdbcException.cs
- WmlCommandAdapter.cs
- GlobalId.cs
- SqlCacheDependency.cs
- EntityContainerEmitter.cs
- TcpStreams.cs
- InputLanguageSource.cs
- Application.cs
- InvalidOperationException.cs
- CqlQuery.cs
- VisualProxy.cs
- GridViewDeletedEventArgs.cs
- XmlSerializer.cs
- ButtonBaseAdapter.cs
- StringArrayConverter.cs
- TableMethodGenerator.cs
- TemplateKeyConverter.cs
- SqlTypeConverter.cs
- KeysConverter.cs
- RangeValidator.cs
- Utils.cs
- basecomparevalidator.cs
- PipelineDeploymentState.cs
- CuspData.cs
- SqlDataSource.cs
- DefaultTraceListener.cs
- SqlDeflator.cs
- AlternateViewCollection.cs
- BuildManagerHost.cs
- ElementAction.cs
- StylusButtonCollection.cs
- PartitionResolver.cs
- DrawingContextDrawingContextWalker.cs
- CriticalHandle.cs
- HwndHost.cs
- TabletDeviceInfo.cs
- SQLBinary.cs
- Context.cs
- PerformanceCounterLib.cs
- SqlDependency.cs
- MultilineStringConverter.cs
- PositiveTimeSpanValidator.cs
- CheckPair.cs
- GeometryValueSerializer.cs
- CatalogPartChrome.cs
- Point4D.cs
- Model3DCollection.cs
- PersonalizationStateInfo.cs
- Cell.cs
- Size3D.cs
- DataPagerCommandEventArgs.cs
- MulticastOption.cs
- Error.cs
- UserPersonalizationStateInfo.cs
- BatchWriter.cs
- IconConverter.cs
- ThreadNeutralSemaphore.cs
- SizeChangedInfo.cs
- PropertyToken.cs
- RoutedEventArgs.cs
- ProcessThreadDesigner.cs
- ObjectIDGenerator.cs
- ValidatorAttribute.cs
- ResourcePermissionBaseEntry.cs
- ControlType.cs
- ReadContentAsBinaryHelper.cs
- ControlPager.cs
- TableCell.cs
- PersonalizationDictionary.cs
- DetailsViewCommandEventArgs.cs
- BrowserCapabilitiesFactory.cs
- TextLineResult.cs
- LinqDataSourceUpdateEventArgs.cs
- ClientUtils.cs
- ConfigXmlReader.cs
- HttpModuleCollection.cs
- ImmutableCommunicationTimeouts.cs
- ObservableCollection.cs
- SafeEventLogReadHandle.cs
- CqlIdentifiers.cs
- BamlCollectionHolder.cs
- BitmapImage.cs
- GridViewDeleteEventArgs.cs
- hresults.cs
- Msec.cs