ResourceConsumptionAttribute 建構函式

定義

初始化 ResourceConsumptionAttribute 類別的新執行個體。

多載

ResourceConsumptionAttribute(ResourceScope)

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

初始化 ResourceConsumptionAttribute 類別的新執行個體,該類別指定消耗之資源的範圍。

ResourceConsumptionAttribute(ResourceScope, ResourceScope)

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

初始化 ResourceConsumptionAttribute 類別的新執行個體,該類別指定消耗之資源的範圍以及資源消耗方式的範圍。

ResourceConsumptionAttribute(ResourceScope)

來源:
ResourceConsumptionAttribute.cs
來源:
ResourceConsumptionAttribute.cs
來源:
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)

來源:
ResourceConsumptionAttribute.cs
來源:
ResourceConsumptionAttribute.cs
來源:
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 範圍。

適用於