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
- HttpHandlerAction.cs
- MethodInfo.cs
- BaseServiceProvider.cs
- ReflectEventDescriptor.cs
- PersonalizationStateQuery.cs
- ForceCopyBuildProvider.cs
- SelectionItemPatternIdentifiers.cs
- OrderedDictionary.cs
- DocumentNUp.cs
- WindowsBrush.cs
- DCSafeHandle.cs
- SynchronizedInputHelper.cs
- ArcSegment.cs
- ReachIDocumentPaginatorSerializerAsync.cs
- SmiMetaDataProperty.cs
- Int32RectConverter.cs
- WebRequestModuleElementCollection.cs
- PatternMatcher.cs
- HttpRawResponse.cs
- XNodeValidator.cs
- RSAProtectedConfigurationProvider.cs
- EntityCollection.cs
- PrimitiveOperationFormatter.cs
- DateTimePickerDesigner.cs
- GACIdentityPermission.cs
- WebPartConnectionsConfigureVerb.cs
- DesignerWidgets.cs
- TypeSystem.cs
- SlipBehavior.cs
- ToolStripSplitButton.cs
- HttpFileCollectionWrapper.cs
- SerializationInfo.cs
- IndentedWriter.cs
- DataStreamFromComStream.cs
- ThousandthOfEmRealPoints.cs
- Trace.cs
- DataReceivedEventArgs.cs
- ImageSourceConverter.cs
- GestureRecognizer.cs
- HttpListener.cs
- Hash.cs
- ModelTreeEnumerator.cs
- ObjectConverter.cs
- CodeCatchClauseCollection.cs
- Pen.cs
- ResourceSet.cs
- ManagedFilter.cs
- SecuritySessionFilter.cs
- Light.cs
- MessagePropertyVariants.cs
- EmptyImpersonationContext.cs
- ItemCollection.cs
- TemplatedMailWebEventProvider.cs
- CodeTypeParameterCollection.cs
- QilSortKey.cs
- WriteTimeStream.cs
- NetMsmqBinding.cs
- ByteRangeDownloader.cs
- SmiEventSink_DeferedProcessing.cs
- WebPartDisplayModeEventArgs.cs
- SchemaContext.cs
- QuotedStringFormatReader.cs
- DeferredElementTreeState.cs
- SafeSerializationManager.cs
- IndexedSelectQueryOperator.cs
- Container.cs
- ControlCollection.cs
- Section.cs
- DockingAttribute.cs
- DropShadowBitmapEffect.cs
- ParseChildrenAsPropertiesAttribute.cs
- GeneratedContractType.cs
- CodeCommentStatement.cs
- XmlAttributeOverrides.cs
- DATA_BLOB.cs
- MergeLocalizationDirectives.cs
- XmlStringTable.cs
- InvalidEnumArgumentException.cs
- CursorConverter.cs
- SynchronizationContext.cs
- FileSecurity.cs
- JavascriptCallbackBehaviorAttribute.cs
- HotCommands.cs
- ModuleBuilder.cs
- TextTabProperties.cs
- Listbox.cs
- RedistVersionInfo.cs
- GlobalProxySelection.cs
- HtmlInputRadioButton.cs
- ThreadStartException.cs
- WorkflowInstanceExtensionProvider.cs
- CodeSnippetStatement.cs
- CommonXSendMessage.cs
- _ScatterGatherBuffers.cs
- WebFormDesignerActionService.cs
- basenumberconverter.cs
- TypeCacheManager.cs
- DynamicQueryableWrapper.cs
- Propagator.Evaluator.cs
- TemplatedWizardStep.cs