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
- TextPenaltyModule.cs
- TextClipboardData.cs
- PipeConnection.cs
- RemotingConfigParser.cs
- DefaultValidator.cs
- CompareValidator.cs
- EventLogPermissionAttribute.cs
- ParameterDataSourceExpression.cs
- TargetException.cs
- SynchronizedChannelCollection.cs
- TextContainerChangedEventArgs.cs
- FontStretch.cs
- DBBindings.cs
- ObjectContext.cs
- RenderDataDrawingContext.cs
- PathGeometry.cs
- SignatureDescription.cs
- SmtpSection.cs
- HelpEvent.cs
- RestClientProxyHandler.cs
- SoapMessage.cs
- FontUnitConverter.cs
- ProbeDuplexCD1AsyncResult.cs
- TraceHandler.cs
- RSAOAEPKeyExchangeFormatter.cs
- MutableAssemblyCacheEntry.cs
- GridViewColumnCollectionChangedEventArgs.cs
- Crc32.cs
- PostBackOptions.cs
- ProtocolImporter.cs
- RoutedEventHandlerInfo.cs
- XmlSchemaIdentityConstraint.cs
- HttpStaticObjectsCollectionWrapper.cs
- VariantWrapper.cs
- IBuiltInEvidence.cs
- ConstrainedDataObject.cs
- AmbientLight.cs
- TextEffectCollection.cs
- Sentence.cs
- TransformPatternIdentifiers.cs
- TextPointer.cs
- QuaternionRotation3D.cs
- SessionPageStatePersister.cs
- SizeFConverter.cs
- CustomErrorsSection.cs
- ImmutablePropertyDescriptorGridEntry.cs
- JsonReader.cs
- SimpleApplicationHost.cs
- SinglePageViewer.cs
- NetworkAddressChange.cs
- ArgumentElement.cs
- DataStreams.cs
- AddressingProperty.cs
- PersonalizationAdministration.cs
- WindowsEditBoxRange.cs
- SelectionItemProviderWrapper.cs
- CollectionBuilder.cs
- ChildChangedEventArgs.cs
- FastEncoder.cs
- contentDescriptor.cs
- CompositeControlDesigner.cs
- Schema.cs
- IntegerValidatorAttribute.cs
- HostProtectionPermission.cs
- FloaterParaClient.cs
- RepeaterItemEventArgs.cs
- TransactionBehavior.cs
- AssemblyBuilder.cs
- OdbcParameterCollection.cs
- DirectionalAction.cs
- Substitution.cs
- SafeThreadHandle.cs
- ProxyWebPartManager.cs
- ProcessThreadCollection.cs
- RightsManagementEncryptedStream.cs
- AccessedThroughPropertyAttribute.cs
- HostingPreferredMapPath.cs
- SqlProvider.cs
- PlatformCulture.cs
- RoleManagerSection.cs
- AssemblyCollection.cs
- StaticContext.cs
- KeyPressEvent.cs
- StylusPointDescription.cs
- BitmapEffectDrawingContent.cs
- Soap.cs
- IndexedString.cs
- FullTextLine.cs
- WindowsToolbarAsMenu.cs
- CardSpaceSelector.cs
- CreateUserWizardStep.cs
- StaticExtensionConverter.cs
- EventProxy.cs
- XPathArrayIterator.cs
- GiveFeedbackEventArgs.cs
- InvalidCastException.cs
- BookmarkOptionsHelper.cs
- ZipIOLocalFileBlock.cs
- EmbeddedMailObject.cs
- Point.cs