mscorlib 2.0.0.0 4.0.0.0 System.Attribute System.AttributeUsage(System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.All, Inherited=false) System.Diagnostics.Conditional("RESOURCE_ANNOTATION_WORK")

If the attribute is applied to a member, the attribute must also be applied.

If the resource scope of the consumed resource is different than the resource scope of how it is consumed, the constructor that takes a parameter should be used to specify how the resource is consumed. For example, a resource may be exposed as a resource, but only used at the and scope. For this example the parameter is set to | .

The parameter in the constructor must specify a greater than or equal to the resource exposure of all called members. For example, a method consuming two resources and one resource would be identified as consuming a and a resource by setting to | .

Public members cannot expose or resources. members cannot expose resources.

The graph of methods terminates when a attribute with a resource scope of is applied to a method.

Specifies the resource consumed by the member of a class. This class cannot be inherited.

- Constructor
  2.0.0.0
  4.0.0.0
  To be added.

  Initializes a new instance of the class specifying the scope of the consumed resource.

  The for the consumed resource.
- Constructor
  2.0.0.0
  4.0.0.0

  If the attribute specifies a scope of , then the attribute must specify a resource it consumes and how it consumes it, by specifying a value for the parameter.

  The scope specified by should be less than or equal to the scope specified by . For example, a scope can be consumed as a or scope, but not as a scope.

  Initializes a new instance of the class specifying the scope of the consumed resource and the scope of how it is consumed.

  The for the consumed resource.
  The used by this member.
- Property
  2.0.0.0
  4.0.0.0
  System.Runtime.Versioning.ResourceScope To be added. To be added.

  Gets the consumption scope for this member.

- Property
  2.0.0.0
  4.0.0.0
  System.Runtime.Versioning.ResourceScope To be added. To be added.

  Gets the resource scope for the consumed resource.