ResourceConsumptionAttribute 构造函数

定义

初始化 ResourceConsumptionAttribute 类的新实例。

重载

名称 说明
ResourceConsumptionAttribute(ResourceScope)

此 API 支持产品基础结构,不能在代码中直接使用。

初始化指定已使用资源的作用域的类的新实例 ResourceConsumptionAttribute

ResourceConsumptionAttribute(ResourceScope, ResourceScope)

此 API 支持产品基础结构,不能在代码中直接使用。

初始化类的新实例,该实例 ResourceConsumptionAttribute 指定已使用资源的作用域及其使用方式的范围。

ResourceConsumptionAttribute(ResourceScope)

Source:
ResourceConsumptionAttribute.cs
Source:
ResourceConsumptionAttribute.cs
Source:
ResourceConsumptionAttribute.cs
Source:
ResourceConsumptionAttribute.cs
Source:
ResourceConsumptionAttribute.cs

初始化指定已使用资源的作用域的类的新实例 ResourceConsumptionAttribute

此 API 支持产品基础结构,不能在代码中直接使用。

public:
 ResourceConsumptionAttribute(System::Runtime::Versioning::ResourceScope resourceScope);
public ResourceConsumptionAttribute(System.Runtime.Versioning.ResourceScope resourceScope);
new System.Runtime.Versioning.ResourceConsumptionAttribute : System.Runtime.Versioning.ResourceScope -> System.Runtime.Versioning.ResourceConsumptionAttribute
Public Sub New (resourceScope As ResourceScope)

参数

resourceScope
ResourceScope

消耗 ResourceScope 的资源。

适用于

ResourceConsumptionAttribute(ResourceScope, ResourceScope)

Source:
ResourceConsumptionAttribute.cs
Source:
ResourceConsumptionAttribute.cs
Source:
ResourceConsumptionAttribute.cs
Source:
ResourceConsumptionAttribute.cs
Source:
ResourceConsumptionAttribute.cs

初始化类的新实例,该实例 ResourceConsumptionAttribute 指定已使用资源的作用域及其使用方式的范围。

此 API 支持产品基础结构,不能在代码中直接使用。

public:
 ResourceConsumptionAttribute(System::Runtime::Versioning::ResourceScope resourceScope, System::Runtime::Versioning::ResourceScope consumptionScope);
public ResourceConsumptionAttribute(System.Runtime.Versioning.ResourceScope resourceScope, System.Runtime.Versioning.ResourceScope consumptionScope);
new System.Runtime.Versioning.ResourceConsumptionAttribute : System.Runtime.Versioning.ResourceScope * System.Runtime.Versioning.ResourceScope -> System.Runtime.Versioning.ResourceConsumptionAttribute
Public Sub New (resourceScope As ResourceScope, consumptionScope As ResourceScope)

参数

resourceScope
ResourceScope

消耗 ResourceScope 的资源。

consumptionScope
ResourceScope

ResourceScope此成员使用的。

注解

ResourceExposureAttribute如果特性指定了范围None,则ResourceConsumptionAttribute特性必须通过指定参数的值consumptionScope来指定它使用的资源及其使用方式。

指定的 consumptionScope 范围应小于或等于指定的 resourceScope范围。 例如, Process 范围可以用作 ProcessAppDomain 范围,但不能用作 Machine 范围。

适用于