a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
150 lines
8.3 KiB
XML
150 lines
8.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<Type Name="AttributeProviderAttribute" FullName="System.ComponentModel.AttributeProviderAttribute">
|
||
<TypeSignature Language="C#" Value="public class AttributeProviderAttribute : Attribute" />
|
||
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit AttributeProviderAttribute extends System.Attribute" />
|
||
<AssemblyInfo>
|
||
<AssemblyName>System</AssemblyName>
|
||
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
||
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
||
</AssemblyInfo>
|
||
<Base>
|
||
<BaseTypeName>System.Attribute</BaseTypeName>
|
||
</Base>
|
||
<Interfaces />
|
||
<Attributes>
|
||
<Attribute>
|
||
<AttributeName>System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)</AttributeName>
|
||
</Attribute>
|
||
</Attributes>
|
||
<Docs>
|
||
<remarks>
|
||
<attribution license="cc4" from="Microsoft" modified="false" />
|
||
<para>There are a few cases in the .NET Framework object model where a property is purposely typed to be vague. For example, the <see cref="P:System.Windows.Forms.DataGridView.DataSource" /> property is typed as object. The reason for this is that this property can accept several types of input. Unfortunately, this provides no common place to add metadata to describe the characteristics of the property. Each DataSource property throughout the .NET Framework needs to have identical metadata for type converters, UI type editors, and other services that require metadata. The <see cref="T:System.ComponentModel.AttributeProviderAttribute" /> remedies this situation.</para>
|
||
<para>Once this attribute is placed on a property, the rules for obtaining attributes for the property descriptor's <see cref="P:System.ComponentModel.MemberDescriptor.Attributes" /> collection differ. Typically, the property descriptor gathers local attributes, and then merges these with attributes from the property type. In this case, the attributes are taken from the type returned from the <see cref="T:System.ComponentModel.AttributeProviderAttribute" />, not from the actual property type. This attribute is used on <see cref="P:System.Windows.Forms.DataGridView.DataSource" /> to point the <see cref="P:System.Windows.Forms.DataGridView.DataSource" /> object's specific type to <see cref="T:System.ComponentModel.IListSource" />, and the appropriate metadata is placed on <see cref="T:System.ComponentModel.IListSource" /> to enable data binding. In so doing, external parties can easily add metadata to all data sources.</para>
|
||
<para>Attributes obtained from a type declared in the <see cref="T:System.ComponentModel.AttributeProviderAttribute" /> have a priority in between the attributes of the property’s type and the attributes on the property. The following list, in priority order, shows the full set of available merged attributes:</para>
|
||
<list type="bullet">
|
||
<item>
|
||
<para>Property Attributes</para>
|
||
</item>
|
||
<item>
|
||
<para>Attribute Provider Attributes</para>
|
||
</item>
|
||
<item>
|
||
<para>Property Type Attributes</para>
|
||
</item>
|
||
</list>
|
||
</remarks>
|
||
<summary>
|
||
<attribution license="cc4" from="Microsoft" modified="false" />
|
||
<para>Enables attribute redirection. This class cannot be inherited.</para>
|
||
</summary>
|
||
</Docs>
|
||
<Members>
|
||
<Member MemberName=".ctor">
|
||
<MemberSignature Language="C#" Value="public AttributeProviderAttribute (string typeName);" />
|
||
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string typeName) cil managed" />
|
||
<MemberType>Constructor</MemberType>
|
||
<AssemblyInfo>
|
||
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
||
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
||
</AssemblyInfo>
|
||
<Parameters>
|
||
<Parameter Name="typeName" Type="System.String" />
|
||
</Parameters>
|
||
<Docs>
|
||
<remarks>To be added.</remarks>
|
||
<summary>
|
||
<attribution license="cc4" from="Microsoft" modified="false" />
|
||
<para>Initializes a new instance of the <see cref="T:System.ComponentModel.AttributeProviderAttribute" /> class with the given type name.</para>
|
||
</summary>
|
||
<param name="typeName">
|
||
<attribution license="cc4" from="Microsoft" modified="false" />The name of the type to specify.</param>
|
||
</Docs>
|
||
</Member>
|
||
<Member MemberName=".ctor">
|
||
<MemberSignature Language="C#" Value="public AttributeProviderAttribute (Type type);" />
|
||
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Type type) cil managed" />
|
||
<MemberType>Constructor</MemberType>
|
||
<AssemblyInfo>
|
||
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
||
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
||
</AssemblyInfo>
|
||
<Parameters>
|
||
<Parameter Name="type" Type="System.Type" />
|
||
</Parameters>
|
||
<Docs>
|
||
<remarks>To be added.</remarks>
|
||
<summary>
|
||
<attribution license="cc4" from="Microsoft" modified="false" />
|
||
<para>Initializes a new instance of the <see cref="T:System.ComponentModel.AttributeProviderAttribute" /> class with the given type.</para>
|
||
</summary>
|
||
<param name="type">
|
||
<attribution license="cc4" from="Microsoft" modified="false" />The type to specify.</param>
|
||
</Docs>
|
||
</Member>
|
||
<Member MemberName=".ctor">
|
||
<MemberSignature Language="C#" Value="public AttributeProviderAttribute (string typeName, string propertyName);" />
|
||
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string typeName, string propertyName) cil managed" />
|
||
<MemberType>Constructor</MemberType>
|
||
<AssemblyInfo>
|
||
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
||
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
||
</AssemblyInfo>
|
||
<Parameters>
|
||
<Parameter Name="typeName" Type="System.String" />
|
||
<Parameter Name="propertyName" Type="System.String" />
|
||
</Parameters>
|
||
<Docs>
|
||
<remarks>To be added.</remarks>
|
||
<summary>
|
||
<attribution license="cc4" from="Microsoft" modified="false" />
|
||
<para>Initializes a new instance of the <see cref="T:System.ComponentModel.AttributeProviderAttribute" /> class with the given type name and property name.</para>
|
||
</summary>
|
||
<param name="typeName">
|
||
<attribution license="cc4" from="Microsoft" modified="false" />The name of the type to specify.</param>
|
||
<param name="propertyName">
|
||
<attribution license="cc4" from="Microsoft" modified="false" />The name of the property for which attributes will be retrieved.</param>
|
||
</Docs>
|
||
</Member>
|
||
<Member MemberName="PropertyName">
|
||
<MemberSignature Language="C#" Value="public string PropertyName { get; }" />
|
||
<MemberSignature Language="ILAsm" Value=".property instance string PropertyName" />
|
||
<MemberType>Property</MemberType>
|
||
<AssemblyInfo>
|
||
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
||
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
||
</AssemblyInfo>
|
||
<ReturnValue>
|
||
<ReturnType>System.String</ReturnType>
|
||
</ReturnValue>
|
||
<Docs>
|
||
<value>To be added.</value>
|
||
<remarks>To be added.</remarks>
|
||
<summary>
|
||
<attribution license="cc4" from="Microsoft" modified="false" />
|
||
<para>Gets the name of the property for which attributes will be retrieved.</para>
|
||
</summary>
|
||
</Docs>
|
||
</Member>
|
||
<Member MemberName="TypeName">
|
||
<MemberSignature Language="C#" Value="public string TypeName { get; }" />
|
||
<MemberSignature Language="ILAsm" Value=".property instance string TypeName" />
|
||
<MemberType>Property</MemberType>
|
||
<AssemblyInfo>
|
||
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
||
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
||
</AssemblyInfo>
|
||
<ReturnValue>
|
||
<ReturnType>System.String</ReturnType>
|
||
</ReturnValue>
|
||
<Docs>
|
||
<value>To be added.</value>
|
||
<remarks>To be added.</remarks>
|
||
<summary>
|
||
<attribution license="cc4" from="Microsoft" modified="false" />
|
||
<para>Gets the assembly qualified type name passed into the constructor.</para>
|
||
</summary>
|
||
</Docs>
|
||
</Member>
|
||
</Members>
|
||
</Type> |