ResourceConsumptionAttribute 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 ResourceConsumptionAttribute 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| ResourceConsumptionAttribute(ResourceScope) |
此 API 支援此產品基礎結構,但無法直接用於程式碼之中。 初始化一個新的類別實例 ResourceConsumptionAttribute ,指定已消耗資源的範圍。 |
| ResourceConsumptionAttribute(ResourceScope, ResourceScope) |
此 API 支援此產品基礎結構,但無法直接用於程式碼之中。 初始化一個新的類別實例 ResourceConsumptionAttribute ,指定消耗資源的範圍及其消耗方式。 |
ResourceConsumptionAttribute(ResourceScope)
初始化一個新的類別實例 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 ,指定消耗資源的範圍及其消耗方式。
此 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 一個範圍可以作為 Process or AppDomain 範圍被消耗,但不能作為 Machine 範圍使用。