Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- DataGridViewBand.cs
- ConfigUtil.cs
- TabletDeviceInfo.cs
- URLIdentityPermission.cs
- CodeDirectionExpression.cs
- Point3D.cs
- QuinticEase.cs
- XXXInfos.cs
- PeerNameRecordCollection.cs
- CellIdBoolean.cs
- PrivilegedConfigurationManager.cs
- ExternalDataExchangeService.cs
- LinqToSqlWrapper.cs
- SettingsPropertyWrongTypeException.cs
- DependentList.cs
- StackOverflowException.cs
- ContractNamespaceAttribute.cs
- NetNamedPipeSecurityMode.cs
- SiteMapProvider.cs
- MediaTimeline.cs
- StateWorkerRequest.cs
- Calendar.cs
- SmtpFailedRecipientsException.cs
- RunWorkerCompletedEventArgs.cs
- Deflater.cs
- baseaxisquery.cs
- CalendarDataBindingHandler.cs
- CustomError.cs
- JsonServiceDocumentSerializer.cs
- ObjectPersistData.cs
- CardSpaceException.cs
- XD.cs
- RolePrincipal.cs
- ActionItem.cs
- RegexBoyerMoore.cs
- ActivityExecutionContext.cs
- SetStoryboardSpeedRatio.cs
- DataGridViewTopRowAccessibleObject.cs
- CounterSampleCalculator.cs
- ToolStripSplitButton.cs
- Panel.cs
- UserControlParser.cs
- StylusButtonCollection.cs
- ContextStaticAttribute.cs
- RefType.cs
- IgnorePropertiesAttribute.cs
- CodeSubDirectoriesCollection.cs
- Vector3DCollectionConverter.cs
- DataSourceXmlClassAttribute.cs
- ConcurrencyBehavior.cs
- DesignerLoader.cs
- StorageMappingFragment.cs
- StreamSecurityUpgradeProvider.cs
- TypefaceMap.cs
- CompletionBookmark.cs
- UIElementParagraph.cs
- Int32AnimationBase.cs
- ScrollData.cs
- TableLayoutSettings.cs
- EntityClientCacheKey.cs
- DropSource.cs
- TemplateComponentConnector.cs
- SkinBuilder.cs
- DescriptionAttribute.cs
- DbLambda.cs
- KnownIds.cs
- NonSerializedAttribute.cs
- OleCmdHelper.cs
- DataListItem.cs
- MSHTMLHost.cs
- x509utils.cs
- VoiceSynthesis.cs
- InputLangChangeEvent.cs
- WebPartConnectionsCancelVerb.cs
- recordstate.cs
- VisualProxy.cs
- EventPrivateKey.cs
- Control.cs
- MenuItemBinding.cs
- ControlBuilder.cs
- EventDescriptor.cs
- SystemResourceHost.cs
- MembershipUser.cs
- EnumerableWrapperWeakToStrong.cs
- _BasicClient.cs
- XpsInterleavingPolicy.cs
- NetNamedPipeBinding.cs
- ServerValidateEventArgs.cs
- WebPartsPersonalizationAuthorization.cs
- RotateTransform3D.cs
- AnonymousIdentificationSection.cs
- ProjectionPlan.cs
- SubMenuStyle.cs
- ExpressionPrinter.cs
- MemberDomainMap.cs
- PixelFormat.cs
- QilGenerator.cs
- Span.cs
- ProfileGroupSettingsCollection.cs
- ReadOnlyObservableCollection.cs