CompositeActivity.CanModifyActivities Proprietà

Definizione

Ottiene o imposta un valore che controlla se le attività singole all'interno di Activities possono essere modificate.

protected public:
 property bool CanModifyActivities { bool get(); void set(bool value); };
protected internal bool CanModifyActivities { get; set; }
member this.CanModifyActivities : bool with get, set
Protected Friend Property CanModifyActivities As Boolean

Valore della proprietà

true se le attività singole all’interno di Activities possono essere modificate; in caso contrario, false.

Esempio

Nel codice seguente viene illustrato come creare attività e aggiungerle come attività figlio a un'attività composta e come impostare le autorizzazioni CanModifyActivities per questo tipo.

Questo esempio di codice è parte dell'esempio SDK Throw e si trova nel file ThrowWorkFlow.cs. Per altre informazioni, vedere Throw Sample.For more information, see Throw Sample.

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

Si applica a