See Also: ResourceConsumptionAttribute Members
If the System.Runtime.Versioning.ResourceConsumptionAttribute attribute is applied to a member, the System.Runtime.Versioning.ResourceExposureAttribute 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 consumptionScope parameter should be used to specify how the resource is consumed. For example, a resource may be exposed as a ResourceScope.Machine resource, but only used at the ResourceScope.Process and ResourceScope.Assembly scope. For this example the consumptionScope parameter is set to ResourceScope.Process | ResourceScope.Assembly.
The resourceScope parameter in the constructor must specify a System.Runtime.Versioning.ResourceScope greater than or equal to the resource exposure of all called members. For example, a method consuming two ResourceScope.Process resources and one ResourceScope.Machine resource would be identified as consuming a ResourceScope.Machine and a ResourceScope.Process resource by setting resourceScope to ResourceScope.Machine | ResourceScope.Process.
The graph of methods terminates when a System.Runtime.Versioning.ResourceExposureAttribute attribute with a resource scope of ResourceScope.None is applied to a method.