ResourceConsumptionAttribute クラスとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ResourceConsumptionAttribute クラスの意味・解説 

ResourceConsumptionAttribute クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

クラスメンバ消費するリソース指定します。このクラス継承できません。

名前空間: System.Runtime.Versioning
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

<AttributeUsageAttribute(AttributeTargets.Constructor Or AttributeTargets.Method
 Or AttributeTargets.Property, Inherited:=False)> _
<ConditionalAttribute("RESOURCE_ANNOTATION_WORK")>
 _
Public NotInheritable Class
 ResourceConsumptionAttribute
    Inherits Attribute
Dim instance As ResourceConsumptionAttribute
[AttributeUsageAttribute(AttributeTargets.Constructor|AttributeTargets.Method|AttributeTargets.Property,
 Inherited=false)] 
[ConditionalAttribute("RESOURCE_ANNOTATION_WORK")] 
public sealed class ResourceConsumptionAttribute
 : Attribute
[AttributeUsageAttribute(AttributeTargets::Constructor|AttributeTargets::Method|AttributeTargets::Property,
 Inherited=false)] 
[ConditionalAttribute(L"RESOURCE_ANNOTATION_WORK")] 
public ref class ResourceConsumptionAttribute
 sealed : public Attribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Constructor|AttributeTargets.Method|AttributeTargets.Property,
 Inherited=false) */ 
/** @attribute ConditionalAttribute("RESOURCE_ANNOTATION_WORK") */ 
public final class ResourceConsumptionAttribute
 extends Attribute
AttributeUsageAttribute(AttributeTargets.Constructor|AttributeTargets.Method|AttributeTargets.Property,
 Inherited=false) 
ConditionalAttribute("RESOURCE_ANNOTATION_WORK") 
public final class ResourceConsumptionAttribute
 extends Attribute
解説解説

ResourceConsumptionAttribute 属性メンバ適用している場合は、ResourceExposureAttribute 属性適用する必要があります

リソース消費されているスコープが、リソース公開されているスコープ異な場合は、consumptionScope パラメータ受け取コンストラクタ使用して公開されているスコープ指定する必要があります。たとえば、リソースMachine リソースとして公開されていても、実際にProcessAssemblyスコープだけで使用されている場合あります。この例の場合consumptionScope パラメータProcess | Assembly設定します

コンストラクタresourceScope パラメータでは、呼び出されるすべてのメンバリソース公開範囲上の ResourceScope を指定する必要があります。たとえば、2 つProcess リソース1 つMachine リソース消費するメソッドは、resourceScopeMachine | Process設定することによって、Machine リソースProcess リソース消費するものとして指定します

Public メンバAssembly リソースPrivate リソース公開できません。また、Assembly メンバPrivate リソース公開できません。

リソース スコープが None の ResourceExposureAttribute 属性メソッド適用すると、メソッドグラフ終了します

継承階層継承階層
System.Object
   System.Attribute
    System.Runtime.Versioning.ResourceConsumptionAttribute
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ResourceConsumptionAttribute メンバ
System.Runtime.Versioning 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からResourceConsumptionAttribute クラスを検索した結果を表示しています。
Weblioに収録されているすべての辞書からResourceConsumptionAttribute クラスを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からResourceConsumptionAttribute クラス を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「ResourceConsumptionAttribute クラス」の関連用語

ResourceConsumptionAttribute クラスのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ResourceConsumptionAttribute クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS