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
- XPathItem.cs
- ToolBarTray.cs
- PieceDirectory.cs
- SqlNodeAnnotations.cs
- CLSCompliantAttribute.cs
- DataListItemCollection.cs
- SkipQueryOptionExpression.cs
- RoleManagerModule.cs
- UrlMapping.cs
- ManifestBasedResourceGroveler.cs
- VarRemapper.cs
- SubMenuStyleCollection.cs
- WebPartDisplayModeEventArgs.cs
- TimeoutValidationAttribute.cs
- HttpModulesSection.cs
- SafeEventLogWriteHandle.cs
- TreeNodeSelectionProcessor.cs
- Int32Animation.cs
- SafeNativeMethods.cs
- WCFServiceClientProxyGenerator.cs
- TextMetrics.cs
- SecurityTokenProvider.cs
- GeometryHitTestResult.cs
- RemotingServices.cs
- ArithmeticException.cs
- RNGCryptoServiceProvider.cs
- QilVisitor.cs
- Timer.cs
- OdbcParameter.cs
- TextParagraphProperties.cs
- DbInsertCommandTree.cs
- RectConverter.cs
- dbdatarecord.cs
- FragmentNavigationEventArgs.cs
- Localizer.cs
- IncrementalReadDecoders.cs
- BitmapEffectDrawing.cs
- _NetworkingPerfCounters.cs
- graph.cs
- StackSpiller.Temps.cs
- ItemCheckedEvent.cs
- OpenFileDialog.cs
- HandlerBase.cs
- AutoCompleteStringCollection.cs
- ListItemConverter.cs
- ResourceDictionaryCollection.cs
- AnnotationResourceCollection.cs
- DesignerOptionService.cs
- ParameterCollectionEditorForm.cs
- Point3DAnimation.cs
- RawStylusActions.cs
- Mouse.cs
- TextFormatterImp.cs
- BitConverter.cs
- EditingMode.cs
- XmlSchemaImport.cs
- DynamicILGenerator.cs
- NullableConverter.cs
- ConstraintConverter.cs
- CacheMemory.cs
- XmlReflectionImporter.cs
- PersianCalendar.cs
- MonthChangedEventArgs.cs
- CompositionCommandSet.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- SimpleTypeResolver.cs
- DataGridViewCellStyleEditor.cs
- SystemColors.cs
- ActiveXHelper.cs
- XmlSchemaChoice.cs
- WmlTextViewAdapter.cs
- XmlLangPropertyAttribute.cs
- ToolboxSnapDragDropEventArgs.cs
- MenuDesigner.cs
- TreeViewAutomationPeer.cs
- SamlConstants.cs
- XmlCountingReader.cs
- KeyValuePairs.cs
- WebPartTransformerCollection.cs
- Polyline.cs
- LicenseContext.cs
- SpotLight.cs
- CultureInfo.cs
- QuotedStringFormatReader.cs
- VirtualDirectoryMapping.cs
- AttributeUsageAttribute.cs
- Attributes.cs
- SerializationAttributes.cs
- SplayTreeNode.cs
- WebPartMinimizeVerb.cs
- RepeatInfo.cs
- InitializationEventAttribute.cs
- followingsibling.cs
- ChooseAction.cs
- ListViewGroup.cs
- SqlStream.cs
- SetterBaseCollection.cs
- ToolStripLocationCancelEventArgs.cs
- BufferModesCollection.cs
- FindCriteria11.cs