Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- RecipientInfo.cs
- InstalledVoice.cs
- ContextMarshalException.cs
- ZipIOExtraFieldPaddingElement.cs
- ParseHttpDate.cs
- SimpleBitVector32.cs
- VisualStateGroup.cs
- PrinterResolution.cs
- SnapshotChangeTrackingStrategy.cs
- HtmlInputText.cs
- MonitorWrapper.cs
- WebHttpBinding.cs
- AnimationStorage.cs
- UriScheme.cs
- _KerberosClient.cs
- GridEntry.cs
- HtmlSelect.cs
- ConfigurationValues.cs
- EntitySqlQueryState.cs
- ErrorHandler.cs
- Configuration.cs
- ExtenderProvidedPropertyAttribute.cs
- MissingManifestResourceException.cs
- ConnectivityStatus.cs
- _SslState.cs
- ExeContext.cs
- LinqDataSourceView.cs
- COM2PictureConverter.cs
- GACIdentityPermission.cs
- DataView.cs
- CodeObject.cs
- HwndKeyboardInputProvider.cs
- ErrorFormatterPage.cs
- CodeTypeDeclaration.cs
- SplayTreeNode.cs
- TextElementCollectionHelper.cs
- RegistryKey.cs
- X500Name.cs
- DataGridViewLinkColumn.cs
- CachingHintValidation.cs
- HostedTransportConfigurationManager.cs
- DynamicDataManager.cs
- ExpressionBinding.cs
- SettingsPropertyValueCollection.cs
- FileStream.cs
- WebOperationContext.cs
- TypedDatasetGenerator.cs
- BinaryMethodMessage.cs
- DebugView.cs
- RotateTransform3D.cs
- BinaryCommonClasses.cs
- AdornerDecorator.cs
- QuaternionIndependentAnimationStorage.cs
- DataTablePropertyDescriptor.cs
- DeclaredTypeValidator.cs
- InternalCache.cs
- BitmapCodecInfo.cs
- XXXOnTypeBuilderInstantiation.cs
- EventListener.cs
- DbProviderFactoriesConfigurationHandler.cs
- Rule.cs
- ExpandableObjectConverter.cs
- DispatcherOperation.cs
- String.cs
- XmlSchemaSimpleTypeUnion.cs
- Trace.cs
- StringAttributeCollection.cs
- EntityDataSourceContainerNameConverter.cs
- TagNameToTypeMapper.cs
- CategoryEditor.cs
- DbCommandTree.cs
- AdCreatedEventArgs.cs
- XmlQuerySequence.cs
- DataTableMappingCollection.cs
- PackagingUtilities.cs
- DefaultValueTypeConverter.cs
- XsdCachingReader.cs
- PaintEvent.cs
- dbenumerator.cs
- CurrencyWrapper.cs
- GlyphRunDrawing.cs
- DoWorkEventArgs.cs
- SpnegoTokenProvider.cs
- UnionCodeGroup.cs
- ExceptionUtil.cs
- OperationFormatStyle.cs
- WebPartEditorCancelVerb.cs
- PathSegmentCollection.cs
- EventProviderWriter.cs
- ProfileGroupSettingsCollection.cs
- Script.cs
- DynamicControlParameter.cs
- UIElementParagraph.cs
- EntityDataSourceChangingEventArgs.cs
- PrintingPermissionAttribute.cs
- LightweightCodeGenerator.cs
- MultipartContentParser.cs
- TTSEvent.cs
- OciHandle.cs
- XmlMemberMapping.cs