ValueTypeFieldReference<TOperand,TResult> クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
式の l 値として使用できる値型のフィールドを表します。
generic <typename TOperand, typename TResult>
public ref class ValueTypeFieldReference sealed : System::Activities::CodeActivity<System::Activities::Location<TResult> ^>
public sealed class ValueTypeFieldReference<TOperand,TResult> : System.Activities.CodeActivity<System.Activities.Location<TResult>>
type ValueTypeFieldReference<'Operand, 'Result> = class
inherit CodeActivity<Location<'Result>>
Public NotInheritable Class ValueTypeFieldReference(Of TOperand, TResult)
Inherits CodeActivity(Of Location(Of TResult))
型パラメーター
- TOperand
値の型。
- TResult
フィールドの種類。
- 継承
-
CodeActivity<Location<TResult>>ValueTypeFieldReference<TOperand,TResult>
例
次のコード例では、Assign アクティビティのValueTypeFieldReference<TOperand,TResult>を使用して、フィールドに整数値を割り当て、フィールド値をコンソールに出力します。
Assign アクティビティは、次の例で定義されているstructを使用する場合、次のステートメントと同じです。
myStructVariable.AField = 1;。
Note
ValueTypeFieldReference<TOperand,TResult> l 値式アクティビティを直接インスタンス化する代わりに、ConvertReferenceを呼び出すように強くお勧めします。これにより、より高い抽象化レベルが提供され、ワークフローをより直感的に実装できます。
// Define a struct with a field named AField.
struct StructWithField
{
public int AField;
}
public static void ValueTypeFieldReferenceSample()
{
// Create a variable of type StructWithField to store the property.
var swfvar = new Variable<StructWithField>("swfvar", new StructWithField());
Activity myActivity = new Sequence
{
Variables = { swfvar },
Activities =
{
// Create an Assign activity to assign a value to the AField field.
new Assign<int>
{
To = new ValueTypeFieldReference<StructWithField, int>()
{
OperandLocation = swfvar,
FieldName = "AField",
},
// Assign an integer value to AField.
Value = 1,
},
// Print the new field value to the console.
new WriteLine()
{
Text = ExpressionServices.Convert<string>(ctx => swfvar.Get(ctx).AField.ToString()),
}
}
};
// Invoke the Sequence activity.
WorkflowInvoker.Invoke(myActivity);
}
コンストラクター
| 名前 | 説明 |
|---|---|
| ValueTypeFieldReference<TOperand,TResult>() |
ValueTypeFieldReference<TOperand,TResult> クラスの新しいインスタンスを初期化します。 |
プロパティ
| 名前 | 説明 |
|---|---|
| CacheId |
ワークフロー定義のスコープ内で一意であるキャッシュの識別子を取得します。 (継承元 Activity) |
| Constraints |
Constraintの検証を提供するように構成できるActivity アクティビティのコレクションを取得します。 (継承元 Activity) |
| DisplayName |
デバッグ、検証、例外処理、追跡に使用されるオプションのフレンドリ名を取得または設定します。 (継承元 Activity) |
| FieldName |
フィールドの名前を取得または設定します。 |
| Id |
ワークフロー定義のスコープ内で一意の識別子を取得します。 (継承元 Activity) |
| Implementation |
サポートされていません。 (継承元 CodeActivity<TResult>) |
| ImplementationVersion |
アクティビティの実装バージョンを取得または設定します。 (継承元 CodeActivity<TResult>) |
| OperandLocation |
フィールドを含む値型のインスタンスを取得または設定します。 |
| Result |
Activity<TResult>の結果引数を取得または設定します。 (継承元 Activity<TResult>) |
| ResultType |
派生クラスで実装された場合、アクティビティ OutArgumentの型を取得します。 (継承元 ActivityWithResult) |
メソッド
| 名前 | 説明 |
|---|---|
| CacheMetadata(ActivityMetadata) |
実装されていません。 CacheMetadata(CodeActivityMetadata) を代わりに使用します。 (継承元 CodeActivity<TResult>) |
| CacheMetadata(CodeActivityMetadata) |
アクティビティの引数、変数、子アクティビティ、およびアクティビティ デリゲートの説明を作成して検証します。 (継承元 CodeActivity<TResult>) |
| Equals(Object) |
指定したオブジェクトが現在のオブジェクトと等しいかどうかを判断します。 (継承元 Object) |
| Execute(CodeActivityContext) |
派生クラスで実装された場合は、アクティビティの実行を実行します。 (継承元 CodeActivity<TResult>) |
| GetHashCode() |
既定のハッシュ関数として機能します。 (継承元 Object) |
| GetType() |
現在のインスタンスの Type を取得します。 (継承元 Object) |
| MemberwiseClone() |
現在の Objectの簡易コピーを作成します。 (継承元 Object) |
| OnCreateDynamicUpdateMap(UpdateMapMetadata, Activity) |
動的更新のマップを作成するときにイベントを発生させます。 (継承元 CodeActivity<TResult>) |
| ShouldSerializeDisplayName() |
DisplayName プロパティをシリアル化する必要があるかどうかを示します。 (継承元 Activity) |
| ToString() |
StringのIdとDisplayNameを含むActivityを返します。 (継承元 Activity) |