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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SerializationTrace.cs
- LocatorPartList.cs
- StrokeCollectionDefaultValueFactory.cs
- RegexCompiler.cs
- InstanceCreationEditor.cs
- MessageBox.cs
- StatusBarPanelClickEvent.cs
- SerializationException.cs
- BrushValueSerializer.cs
- WpfPayload.cs
- TextBoxAutomationPeer.cs
- DataGridPagerStyle.cs
- ConstrainedGroup.cs
- LinqExpressionNormalizer.cs
- DataControlFieldCollection.cs
- GCHandleCookieTable.cs
- CallbackHandler.cs
- StructuredTypeEmitter.cs
- XmlMapping.cs
- MessageRpc.cs
- Literal.cs
- UIElementAutomationPeer.cs
- EmbeddedMailObjectsCollection.cs
- FlowDocument.cs
- XmlHierarchyData.cs
- EditorOptionAttribute.cs
- Registry.cs
- MILUtilities.cs
- RoutedEventArgs.cs
- TextParagraphProperties.cs
- Stack.cs
- autovalidator.cs
- Deflater.cs
- CaseStatement.cs
- SqlInternalConnectionTds.cs
- RotationValidation.cs
- ConfigurationValidatorBase.cs
- HostExecutionContextManager.cs
- SoapServerMethod.cs
- DesignerAutoFormatCollection.cs
- ExternalCalls.cs
- ScrollBarRenderer.cs
- WindowsFormsSectionHandler.cs
- ChangeBlockUndoRecord.cs
- Tuple.cs
- TimeoutException.cs
- CheckBox.cs
- KeyEvent.cs
- ResXResourceWriter.cs
- RightsManagementEncryptionTransform.cs
- FactoryRecord.cs
- MachineKeyConverter.cs
- Rfc2898DeriveBytes.cs
- WebControlsSection.cs
- SqlXmlStorage.cs
- GPRECT.cs
- XPathItem.cs
- RelationshipEndMember.cs
- WFItemsToSpacerVisibility.cs
- Variable.cs
- AudioStateChangedEventArgs.cs
- FontFamilyIdentifier.cs
- InitiatorSessionSymmetricTransportSecurityProtocol.cs
- PagedDataSource.cs
- XmlAutoDetectWriter.cs
- StringExpressionSet.cs
- RuntimeEnvironment.cs
- DataGrid.cs
- SkipQueryOptionExpression.cs
- ResourceWriter.cs
- JpegBitmapEncoder.cs
- ObjectViewQueryResultData.cs
- ReflectionHelper.cs
- BitmapEffectrendercontext.cs
- SecurityDescriptor.cs
- FlowDocumentFormatter.cs
- CategoryEditor.cs
- SystemParameters.cs
- DesignerSerializationOptionsAttribute.cs
- XmlImplementation.cs
- EvidenceTypeDescriptor.cs
- CodeMemberProperty.cs
- RootBrowserWindowProxy.cs
- InternalBase.cs
- ObjectPersistData.cs
- UserPersonalizationStateInfo.cs
- IndexedEnumerable.cs
- SiblingIterators.cs
- SelectionChangedEventArgs.cs
- SQLGuid.cs
- ApplicationTrust.cs
- GraphicsPathIterator.cs
- X509CertificateEndpointIdentity.cs
- ScriptControlManager.cs
- Common.cs
- ValidateNames.cs
- SafeFileMapViewHandle.cs
- MissingMemberException.cs
- ETagAttribute.cs
- GatewayDefinition.cs