Activity.Name プロパティ

定義

このインスタンスの名前を取得または設定します。 この名前は、ワークフロー プロジェクトの作成に使用されたプログラミング言語の変数の名前付け規則に準拠している必要があります。

public:
 property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Browsable(true)]
public string Name { get; set; }
[<System.ComponentModel.Browsable(true)>]
member this.Name : string with get, set
Public Property Name As String

プロパティ値

このインスタンスの名前。

属性

次のコードは、アクティビティを作成し、これを子として複合アクティビティに追加し、Name を設定する方法を示しています。

このコード例は、ThrowWorkFlow.cs ファイルから抜粋したスローの SDK サンプルの一部です。 詳細については、「サンプルの スロー」を参照してください。

this.CanModifyActivities = true;
System.Workflow.ComponentModel.ActivityBind activitybind1 = new System.Workflow.ComponentModel.ActivityBind();
this.throwActivity1 = new System.Workflow.ComponentModel.ThrowActivity();
activitybind1.Name = "ThrowWorkflow";
activitybind1.Path = "ThrownException";
//
// throwActivity1
//
this.throwActivity1.Name = "throwActivity1";
this.throwActivity1.SetBinding(System.Workflow.ComponentModel.ThrowActivity.FaultProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
//
// ThrowWorkflow
//
this.Activities.Add(this.throwActivity1);
this.Name = "ThrowWorkflow";
this.CanModifyActivities = false;
Me.CanModifyActivities = True
Dim activitybind1 As New System.Workflow.ComponentModel.ActivityBind()
Me.throwActivity1 = New System.Workflow.ComponentModel.ThrowActivity()
activitybind1.Name = "ThrowWorkflow"
activitybind1.Path = "ThrownException"
' 
' throwActivity1
' 
Me.throwActivity1.Name = "throwActivity1"
Me.throwActivity1.SetBinding(System.Workflow.ComponentModel.ThrowActivity.FaultProperty, activitybind1)
' 
' ThrowWorkflow
' 
Me.Activities.Add(Me.throwActivity1)
Me.Name = "ThrowWorkflow"
Me.CanModifyActivities = False

注釈

既定値は空文字列です。

このプロパティはメタ プロパティです。つまり、実行時には変更できません。 メタ プロパティは、実行時にプロパティ インスタンスが作成された後は変更されません。そのため、デザイン時にプロパティをリテラル値に設定する必要があります。

適用対象