Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- OdbcStatementHandle.cs
- EncryptedType.cs
- Panel.cs
- WindowsAuthenticationModule.cs
- CalendarAutoFormatDialog.cs
- DynamicDocumentPaginator.cs
- ClientRoleProvider.cs
- Image.cs
- SimpleModelProvider.cs
- SerialErrors.cs
- SafeNativeMethodsMilCoreApi.cs
- AutoSizeComboBox.cs
- SystemResourceKey.cs
- RemotingConfigParser.cs
- CompilationLock.cs
- AppDomain.cs
- Typography.cs
- IResourceProvider.cs
- NativeMethods.cs
- OptionalMessageQuery.cs
- KoreanCalendar.cs
- Style.cs
- XmlSchemaGroup.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- TransformerInfoCollection.cs
- ChannelManager.cs
- QueryGeneratorBase.cs
- PeerTransportCredentialType.cs
- SqlFunctionAttribute.cs
- XmlConvert.cs
- DESCryptoServiceProvider.cs
- BasicViewGenerator.cs
- SystemThemeKey.cs
- CreateUserWizardStep.cs
- MembershipPasswordException.cs
- BoundColumn.cs
- HtmlContainerControl.cs
- CalloutQueueItem.cs
- ScriptResourceDefinition.cs
- RectValueSerializer.cs
- ISAPIWorkerRequest.cs
- BypassElement.cs
- TextParagraphCache.cs
- DesignerEventService.cs
- TextElementCollection.cs
- SafeMILHandle.cs
- TryExpression.cs
- VariableAction.cs
- ChannelManagerService.cs
- BehaviorEditorPart.cs
- SectionRecord.cs
- HttpCachePolicyElement.cs
- ResetableIterator.cs
- MultipleViewPatternIdentifiers.cs
- IdentifierService.cs
- DataObjectMethodAttribute.cs
- NativeMethods.cs
- BooleanStorage.cs
- ToolStripDesignerAvailabilityAttribute.cs
- UseAttributeSetsAction.cs
- AssemblySettingAttributes.cs
- HttpDictionary.cs
- ToolStripMenuItemCodeDomSerializer.cs
- XmlUtil.cs
- KeyBinding.cs
- SiteMapPath.cs
- SqlDataAdapter.cs
- LoadGrammarCompletedEventArgs.cs
- TypefaceMetricsCache.cs
- HtmlInputPassword.cs
- Bold.cs
- KeyEvent.cs
- WmpBitmapEncoder.cs
- DtrList.cs
- StylusSystemGestureEventArgs.cs
- ConfigXmlCDataSection.cs
- InternalConfigConfigurationFactory.cs
- embossbitmapeffect.cs
- DataGridViewCellStyleEditor.cs
- BinaryOperationBinder.cs
- StickyNoteContentControl.cs
- LeftCellWrapper.cs
- FormViewDeletedEventArgs.cs
- XmlResolver.cs
- TargetPerspective.cs
- ProcessInfo.cs
- panel.cs
- GlobalizationSection.cs
- Nullable.cs
- WebPartConnectionsCancelEventArgs.cs
- SqlServices.cs
- SettingsBase.cs
- ConfigurationSchemaErrors.cs
- OracleRowUpdatedEventArgs.cs
- MetadataItemEmitter.cs
- TableChangeProcessor.cs
- ContentTypeSettingDispatchMessageFormatter.cs
- StyleModeStack.cs
- MDIWindowDialog.cs
- CategoryNameCollection.cs