1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
|
<?xml version="1.0" encoding="utf-8"?>
<Type Name="ResourceConsumptionAttribute" FullName="System.Runtime.Versioning.ResourceConsumptionAttribute">
<TypeSignature Language="C#" Value="public sealed class ResourceConsumptionAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit ResourceConsumptionAttribute extends System.Attribute" />
<AssemblyInfo>
<AssemblyName>mscorlib</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.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.All, Inherited=false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Diagnostics.Conditional("RESOURCE_ANNOTATION_WORK")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>If the <see cref="T:System.Runtime.Versioning.ResourceConsumptionAttribute" /> attribute is applied to a member, the <see cref="T:System.Runtime.Versioning.ResourceExposureAttribute" /> attribute must also be applied.</para>
<para>If the resource scope of the consumed resource is different than the resource scope of how it is consumed, the constructor that takes a <paramref name="consumptionScope" /> parameter should be used to specify how the resource is consumed. For example, a resource may be exposed as a <see cref="F:System.Runtime.Versioning.ResourceScope.Machine" /> resource, but only used at the <see cref="F:System.Runtime.Versioning.ResourceScope.Process" /> and <see cref="F:System.Runtime.Versioning.ResourceScope.Assembly" /> scope. For this example the <paramref name="consumptionScope" /> parameter is set to <see cref="F:System.Runtime.Versioning.ResourceScope.Process" /> | <see cref="F:System.Runtime.Versioning.ResourceScope.Assembly" />.</para>
<para>The <paramref name="resourceScope" /> parameter in the constructor must specify a <see cref="T:System.Runtime.Versioning.ResourceScope" /> greater than or equal to the resource exposure of all called members. For example, a method consuming two <see cref="F:System.Runtime.Versioning.ResourceScope.Process" /> resources and one <see cref="F:System.Runtime.Versioning.ResourceScope.Machine" /> resource would be identified as consuming a <see cref="F:System.Runtime.Versioning.ResourceScope.Machine" /> and a <see cref="F:System.Runtime.Versioning.ResourceScope.Process" /> resource by setting <paramref name="resourceScope" /> to <see cref="F:System.Runtime.Versioning.ResourceScope.Machine" /> | <see cref="F:System.Runtime.Versioning.ResourceScope.Process" />.</para>
<para>Public members cannot expose <see cref="F:System.Runtime.Versioning.ResourceScope.Assembly" /> or <see cref="F:System.Runtime.Versioning.ResourceScope.Private" /> resources. <see cref="F:System.Runtime.Versioning.ResourceScope.Assembly" /> members cannot expose <see cref="F:System.Runtime.Versioning.ResourceScope.Private" /> resources.</para>
<para>The graph of methods terminates when a <see cref="T:System.Runtime.Versioning.ResourceExposureAttribute" /> attribute with a resource scope of <see cref="F:System.Runtime.Versioning.ResourceScope.None" /> is applied to a method.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Specifies the resource consumed by the member of a class. This class cannot be inherited.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ResourceConsumptionAttribute (System.Runtime.Versioning.ResourceScope resourceScope);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.Runtime.Versioning.ResourceScope resourceScope) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="resourceScope" Type="System.Runtime.Versioning.ResourceScope" />
</Parameters>
<Docs>
<remarks>To be added.</remarks>
<since version=".NET 2.0" />
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Runtime.Versioning.ResourceConsumptionAttribute" /> class specifying the scope of the consumed resource. </para>
</summary>
<param name="resourceScope">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Runtime.Versioning.ResourceScope" /> for the consumed resource.</param>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ResourceConsumptionAttribute (System.Runtime.Versioning.ResourceScope resourceScope, System.Runtime.Versioning.ResourceScope consumptionScope);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.Runtime.Versioning.ResourceScope resourceScope, valuetype System.Runtime.Versioning.ResourceScope consumptionScope) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="resourceScope" Type="System.Runtime.Versioning.ResourceScope" />
<Parameter Name="consumptionScope" Type="System.Runtime.Versioning.ResourceScope" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>If the <see cref="T:System.Runtime.Versioning.ResourceExposureAttribute" /> attribute specifies a scope of <see cref="F:System.Runtime.Versioning.ResourceScope.None" />, then the <see cref="T:System.Runtime.Versioning.ResourceConsumptionAttribute" /> attribute must specify a resource it consumes and how it consumes it, by specifying a value for the <paramref name="consumptionScope" /> parameter.</para>
<para>The scope specified by <paramref name="consumptionScope" /> should be less than or equal to the scope specified by <paramref name="resourceScope" />. For example, a <see cref="F:System.Runtime.Versioning.ResourceScope.Process" /> scope can be consumed as a <see cref="F:System.Runtime.Versioning.ResourceScope.Process" /> or <see cref="F:System.Runtime.Versioning.ResourceScope.AppDomain" /> scope, but not as a <see cref="F:System.Runtime.Versioning.ResourceScope.Machine" /> scope.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Runtime.Versioning.ResourceConsumptionAttribute" /> class specifying the scope of the consumed resource and the scope of how it is consumed.</para>
</summary>
<param name="resourceScope">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Runtime.Versioning.ResourceScope" /> for the consumed resource.</param>
<param name="consumptionScope">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Runtime.Versioning.ResourceScope" /> used by this member.</param>
</Docs>
</Member>
<Member MemberName="ConsumptionScope">
<MemberSignature Language="C#" Value="public System.Runtime.Versioning.ResourceScope ConsumptionScope { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Runtime.Versioning.ResourceScope ConsumptionScope" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Runtime.Versioning.ResourceScope</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>To be added.</remarks>
<since version=".NET 2.0" />
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the consumption scope for this member.</para>
</summary>
</Docs>
</Member>
<Member MemberName="ResourceScope">
<MemberSignature Language="C#" Value="public System.Runtime.Versioning.ResourceScope ResourceScope { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Runtime.Versioning.ResourceScope ResourceScope" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Runtime.Versioning.ResourceScope</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>To be added.</remarks>
<since version=".NET 2.0" />
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the resource scope for the consumed resource.</para>
</summary>
</Docs>
</Member>
</Members>
</Type>
|