Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / TypeConverterAttribute.cs / 1305376 / 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
- TextDecorations.cs
- EdmComplexPropertyAttribute.cs
- PreviewPrintController.cs
- ByteAnimationUsingKeyFrames.cs
- KeyBinding.cs
- MonitorWrapper.cs
- AsyncPostBackTrigger.cs
- BufferedStream.cs
- DataRowExtensions.cs
- JournalEntryListConverter.cs
- KerberosSecurityTokenAuthenticator.cs
- IsolatedStorageFileStream.cs
- HMACSHA1.cs
- FormViewDeleteEventArgs.cs
- AutomationTextAttribute.cs
- StringBuilder.cs
- SwitchAttribute.cs
- Mouse.cs
- BulletedListEventArgs.cs
- SqlClientWrapperSmiStream.cs
- TransformPattern.cs
- TrackBar.cs
- CacheMemory.cs
- XmlAttributeCollection.cs
- BitmapData.cs
- StructuredTypeEmitter.cs
- RectValueSerializer.cs
- SpellCheck.cs
- ToolStripRendererSwitcher.cs
- AuthenticationException.cs
- DataListItemCollection.cs
- WebPartVerbsEventArgs.cs
- AutoResetEvent.cs
- CompModSwitches.cs
- DataGridViewCellValidatingEventArgs.cs
- ApplicationBuildProvider.cs
- TickBar.cs
- AttachedPropertyInfo.cs
- linebase.cs
- OdbcParameter.cs
- ChangeInterceptorAttribute.cs
- BuildProvidersCompiler.cs
- ContractComponent.cs
- XmlSchemaAppInfo.cs
- XPathNodeList.cs
- BitmapEffect.cs
- NominalTypeEliminator.cs
- XsdCachingReader.cs
- DataGridRow.cs
- Matrix3D.cs
- ClientTarget.cs
- OutputCacheSettings.cs
- MetadataPropertyvalue.cs
- ServiceSecurityAuditBehavior.cs
- datacache.cs
- XmlAttributeProperties.cs
- StickyNoteHelper.cs
- ClrPerspective.cs
- SecurityManager.cs
- CombinedTcpChannel.cs
- MessageTransmitTraceRecord.cs
- UIElementAutomationPeer.cs
- TransactionCache.cs
- Stream.cs
- PackUriHelper.cs
- HashHelper.cs
- StringKeyFrameCollection.cs
- AttributeQuery.cs
- XamlWrappingReader.cs
- TextBoxBase.cs
- AsymmetricKeyExchangeDeformatter.cs
- ForceCopyBuildProvider.cs
- StylusTouchDevice.cs
- DataGridViewCellStyleChangedEventArgs.cs
- PackageFilter.cs
- UnmanagedMemoryStreamWrapper.cs
- TableAutomationPeer.cs
- BinaryMessageFormatter.cs
- OdbcConnectionStringbuilder.cs
- CompiledRegexRunnerFactory.cs
- ScriptComponentDescriptor.cs
- _ShellExpression.cs
- ColumnPropertiesGroup.cs
- EncryptedType.cs
- SchemaCollectionPreprocessor.cs
- ObjectContextServiceProvider.cs
- MethodImplAttribute.cs
- FilterableAttribute.cs
- LockCookie.cs
- TransformerTypeCollection.cs
- BinaryNode.cs
- BrowserCapabilitiesFactoryBase.cs
- TypeDefinition.cs
- CalendarData.cs
- GrammarBuilder.cs
- ControlBuilderAttribute.cs
- uribuilder.cs
- SyntaxCheck.cs
- DataGridViewCheckBoxColumn.cs
- PerfCounterSection.cs