ConditionBaseAttribute クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
この属性は、条件に基づいて、オプションのメッセージを使用して、テスト クラスまたはテスト メソッドを実行するか無視するかを条件付きで制御するために使用されます。
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, Inherited=false)]
public abstract class ConditionBaseAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, Inherited=false)]
[System.Runtime.CompilerServices.Nullable(0)]
public abstract class ConditionBaseAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, Inherited=false)>]
type ConditionBaseAttribute = class
inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, Inherited=false)>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type ConditionBaseAttribute = class
inherit Attribute
Public MustInherit Class ConditionBaseAttribute
Inherits Attribute
- 継承
-
ConditionBaseAttribute
- 派生
- 属性
注釈
この属性は継承されません。 基底クラスに適用しても、派生クラスには影響しません。
コンストラクター
| 名前 | 説明 |
|---|---|
| ConditionBaseAttribute(ConditionMode) |
ConditionBaseAttribute クラスの新しいインスタンスを初期化します。 |
プロパティ
| 名前 | 説明 |
|---|---|
| GroupName |
この属性のグループ名を取得します。 これは、 ConditionBaseAttribute を継承する複数の属性が存在する場合に関連します。 同じグループ内の属性の IsConditionMet 値は、"OR" で結合されます。 異なるグループの値は "AND" 一緒に使用されます。 つまり、すべての IsConditionMet 値が false の場合、テストは無視されます。 |
| IgnoreMessage |
テスト メソッドまたはテスト クラスを無視する理由を示す無視メッセージを取得または設定します。 |
| IsConditionMet |
条件が満たされているかどうかを示す値を取得します。 このプロパティの実装では、 Mode プロパティを読み取ってはいけません。 |
| Mode |
条件モードを取得します。 |
| ShouldRun |
テスト メソッドまたはテスト クラスを無視するかどうかを示す値を取得します。 |