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
- HandleCollector.cs
- PolyQuadraticBezierSegment.cs
- OleDbTransaction.cs
- VisualBrush.cs
- PartitionedDataSource.cs
- Convert.cs
- TouchesCapturedWithinProperty.cs
- OdbcParameterCollection.cs
- PolyBezierSegment.cs
- Imaging.cs
- RefreshResponseInfo.cs
- FormViewUpdatedEventArgs.cs
- PageThemeParser.cs
- StylusPointPropertyInfoDefaults.cs
- XmlSchemaImport.cs
- WindowsRichEdit.cs
- CalendarDateRangeChangingEventArgs.cs
- WebPartVerbsEventArgs.cs
- DataGridViewCellPaintingEventArgs.cs
- sqlnorm.cs
- RuleDefinitions.cs
- SecurityAccessDeniedException.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- ScriptHandlerFactory.cs
- JsonFormatReaderGenerator.cs
- ClientTargetSection.cs
- FontSizeConverter.cs
- FrameSecurityDescriptor.cs
- Variable.cs
- QilXmlReader.cs
- ResXFileRef.cs
- LocalIdCollection.cs
- SettingsProperty.cs
- DockAndAnchorLayout.cs
- Focus.cs
- GacUtil.cs
- WorkflowMessageEventArgs.cs
- precedingquery.cs
- CompiledRegexRunnerFactory.cs
- Encoder.cs
- CatalogPartChrome.cs
- HtmlForm.cs
- SmtpTransport.cs
- XPathNavigator.cs
- Floater.cs
- EntityTypeEmitter.cs
- SurrogateEncoder.cs
- ConfigurationLockCollection.cs
- DialogWindow.cs
- SqlRetyper.cs
- XmlResolver.cs
- Context.cs
- SpotLight.cs
- WebConfigurationManager.cs
- XmlToDatasetMap.cs
- Hashtable.cs
- FormsAuthenticationEventArgs.cs
- NativeWindow.cs
- TextSpan.cs
- SignalGate.cs
- Int32RectConverter.cs
- NativeMethods.cs
- TraceContext.cs
- DependencyPropertyChangedEventArgs.cs
- FacetDescriptionElement.cs
- ServiceModelEnumValidator.cs
- AttachedPropertyDescriptor.cs
- DataPagerField.cs
- XMLSyntaxException.cs
- StatusBarAutomationPeer.cs
- EmbeddedMailObject.cs
- base64Transforms.cs
- PrinterResolution.cs
- OleDbReferenceCollection.cs
- SmiEventStream.cs
- DiscoveryMessageSequenceCD1.cs
- FacetChecker.cs
- WindowsSlider.cs
- _PooledStream.cs
- TextMetrics.cs
- MobileControl.cs
- RootBrowserWindowProxy.cs
- RoleProviderPrincipal.cs
- BeginStoryboard.cs
- util.cs
- Animatable.cs
- IndicShape.cs
- TemplateContent.cs
- ZipPackagePart.cs
- BaseValidator.cs
- SqlDataSourceSelectingEventArgs.cs
- TabItem.cs
- FastEncoder.cs
- CodeActivityMetadata.cs
- MenuItem.cs
- GradientBrush.cs
- unsafenativemethodsother.cs
- HashSet.cs
- ContextStaticAttribute.cs
- AnimationClockResource.cs