Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- CodeTypeReferenceCollection.cs
- AdornerPresentationContext.cs
- UInt32Converter.cs
- Publisher.cs
- XmlSchemas.cs
- FlowLayoutPanelDesigner.cs
- ConstraintConverter.cs
- NamespaceListProperty.cs
- BaseCodePageEncoding.cs
- UInt16.cs
- InternalConfigConfigurationFactory.cs
- ObjectItemAssemblyLoader.cs
- IntegerValidator.cs
- SelectionProviderWrapper.cs
- AnonymousIdentificationModule.cs
- SelectedGridItemChangedEvent.cs
- DataGridViewAddColumnDialog.cs
- EntityDataSourceDesignerHelper.cs
- BoundColumn.cs
- BevelBitmapEffect.cs
- StartUpEventArgs.cs
- DetailsViewPageEventArgs.cs
- WebPartConnectionsConnectVerb.cs
- CacheAxisQuery.cs
- ExtractedStateEntry.cs
- Point3DCollection.cs
- QueryResponse.cs
- Reference.cs
- InfoCardPolicy.cs
- DropShadowBitmapEffect.cs
- ProvidersHelper.cs
- CapabilitiesPattern.cs
- DrawingContextDrawingContextWalker.cs
- NativeMethodsOther.cs
- HashFinalRequest.cs
- ContextMenu.cs
- BitmapCacheBrush.cs
- OdbcEnvironmentHandle.cs
- ExitEventArgs.cs
- IdentifierCollection.cs
- XmlStreamStore.cs
- MethodBuilder.cs
- Activator.cs
- TimelineClockCollection.cs
- HostedHttpRequestAsyncResult.cs
- VScrollBar.cs
- XmlQualifiedNameTest.cs
- WebServiceClientProxyGenerator.cs
- MsdtcClusterUtils.cs
- ProtectedProviderSettings.cs
- ConstrainedDataObject.cs
- ExtensionDataObject.cs
- DoubleCollection.cs
- WebPartPersonalization.cs
- FormsAuthenticationUserCollection.cs
- HttpApplicationStateBase.cs
- RowUpdatedEventArgs.cs
- Evaluator.cs
- DebugHandleTracker.cs
- SmiEventSink_Default.cs
- Int16AnimationUsingKeyFrames.cs
- SqlFlattener.cs
- SynchronizedDisposablePool.cs
- PropertyGridEditorPart.cs
- Pens.cs
- ViewKeyConstraint.cs
- TableLayoutStyleCollection.cs
- HttpBrowserCapabilitiesWrapper.cs
- ScriptReferenceBase.cs
- FamilyMapCollection.cs
- HttpResponseHeader.cs
- DynamicValidatorEventArgs.cs
- MediaPlayer.cs
- AdPostCacheSubstitution.cs
- TabPage.cs
- DataTemplateKey.cs
- TranslateTransform.cs
- TextTreeInsertUndoUnit.cs
- LinearGradientBrush.cs
- SRef.cs
- StaticResourceExtension.cs
- EmbeddedMailObjectsCollection.cs
- ServiceContractGenerator.cs
- RegexCompiler.cs
- SyntaxCheck.cs
- InheritanceRules.cs
- DataSourceIDConverter.cs
- GeometryDrawing.cs
- CodeDelegateInvokeExpression.cs
- CachingHintValidation.cs
- RequestCachePolicy.cs
- Oid.cs
- CustomErrorsSection.cs
- Marshal.cs
- AsymmetricSignatureDeformatter.cs
- WSSecureConversationDec2005.cs
- XmlWrappingWriter.cs
- ADRoleFactory.cs
- CryptoProvider.cs
- ConfigurationManagerInternalFactory.cs