ValueTypeIndexerReference<TOperand,TItem> クラス

定義

式の左辺値として使用できる値型のインデクサーによって参照される要素を表します。

generic <typename TOperand, typename TItem>
public ref class ValueTypeIndexerReference sealed : System::Activities::CodeActivity<System::Activities::Location<TItem> ^>
[System.Windows.Markup.ContentProperty("Indices")]
public sealed class ValueTypeIndexerReference<TOperand,TItem> : System.Activities.CodeActivity<System.Activities.Location<TItem>>
[<System.Windows.Markup.ContentProperty("Indices")>]
type ValueTypeIndexerReference<'Operand, 'Item> = class
    inherit CodeActivity<Location<'Item>>
Public NotInheritable Class ValueTypeIndexerReference(Of TOperand, TItem)
Inherits CodeActivity(Of Location(Of TItem))

型パラメーター

TOperand

インデクサーを持つ値型。

TItem

インデクサー配列の型。

継承
ValueTypeIndexerReference<TOperand,TItem>
属性

次のコード例では、ValueTypeIndexerReference<TOperand,TItem>Assign アクティビティで使用することで、インデックス 1 の string 要素に struct 値を割り当てて、要素値をコンソールに出力します。 アクティビティは、次に示す例で定義されている を使用する場合に ステートメントと同等です。

注意

ValueTypeIndexerReference<TOperand,TItem> 左辺値式のアクティビティを直接インスタンス化する代わりに、ConvertReference を呼び出すことをお勧めします。後者の方法は抽象化レベルが高いので、より直感的にワークフローを実装できます。

    // Define a struct with an indexer.  
    struct StructWithIndexer  
    {  
        string val;  
        public string this[int index]  
        {                  
            get { return val; }  
            set { val = value; }  
        }  
    }  

    public static void ValueTypeIndexerReferenceSample()  
    {  
        // Create a variable of type StructWithIndexer to store the element.  
        var swivar = new Variable<StructWithIndexer>("swivar", new StructWithIndexer());  

        // Create the top-level activity to be invoked later.  
        Activity myActivity = new Sequence  
        {  
            Variables = { swivar },  
            Activities =   
            {  
                // Create an Assign activity with an element at index 1.  
                new Assign<string>  
                {  
                    To = new ValueTypeIndexerReference<StructWithIndexer, string>  
                    {  
                        OperandLocation = swivar,  
                        Indices = { new InArgument<int>(1) },  
                    },  
                    // Assign a string literal to the element at index 1.  
                    Value = "Hello",  
                },  
                new WriteLine()  
                {  
                    Text = ExpressionServices.Convert<string>(ctx => swivar.Get(ctx)[1]),  
                }  
            }  
        };  

        // Invoke the Sequence activity.  
        WorkflowInvoker.Invoke(myActivity);  
}  

コンストラクター

ValueTypeIndexerReference<TOperand,TItem>()

ValueTypeIndexerReference<TOperand,TItem> クラスの新しいインスタンスを初期化します。

プロパティ

CacheId

ワークフロー定義のスコープ内で一意であるキャッシュの識別子を取得します。

(継承元 Activity)
Constraints

Constraint に検証を提供するよう構成できる Activity アクティビティのコレクションを取得します。

(継承元 Activity)
DisplayName

デバッグ、検証、例外処理、および追跡に使用する省略可能な表示名を取得または設定します。

(継承元 Activity)
Id

ワークフロー定義のスコープ内で一意である識別子を取得します。

(継承元 Activity)
Implementation

サポートされていません。

(継承元 CodeActivity<TResult>)
ImplementationVersion

アクティビティの実装バージョンを取得または設定します。

(継承元 CodeActivity<TResult>)
Indices

インデクサー配列内の要素のインデックスを表す引数のコレクションを取得します。

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()

StringId および DisplayName を含む Activity を返します。

(継承元 Activity)

適用対象