EditingScope EditingScope EditingScope EditingScope Class


編輯範圍,代表 ModelItem 樹狀結構的變更集合,可加以認可或當做工作的原子單元來復原。An editing scope represents a collection of changes to the ModelItem tree that can be committed or rolled back as one atomic unit of work.

public ref class EditingScope : System::Activities::Presentation::Model::ModelEditingScope
public class EditingScope : System.Activities.Presentation.Model.ModelEditingScope
type EditingScope = class
    inherit ModelEditingScope
Public Class EditingScope
Inherits ModelEditingScope


批次處理針對多個 ModelItem 物件進行的變更集時,這個功能非常有用。This is useful for batching together a set of changes to multiple ModelItem objects. 例如,在傳訊活動中,從引發對話進行的變更會影響多個屬性值。As an example, in the messaging activities, the changes made from the raised dialogs will impact multiple property values. 不過,由於所有變更均來自於引發對話,因此需將變更視為批次變更,並當做單一工作單元來復原。However, as all of the changes come from the raised dialog, the changes need to be considered as a batch and undone as a single unit of work. 如需使用方式的詳細資訊,請參閱「編輯範圍」範例For more details on usage, see the Editing Scope sample


Changes Changes Changes Changes

取得變更的清單。Gets a list of changes.

Description Description Description Description

描述變更群組。Describes the group of changes. 它可在認可變更之前隨時加以變更。It can be changed anytime before the changes are committed.

(Inherited from ModelEditingScope)
HasEffectiveChanges HasEffectiveChanges HasEffectiveChanges HasEffectiveChanges

取得布林值,這個布林值會指定是否已將變更套用至編輯範圍。Gets a Boolean that specifies whether changes have been applied to the editing scope.


CanComplete() CanComplete() CanComplete() CanComplete()

判斷目前的編輯範圍執行個體是否可完成。Determines whether the current editing scope instance can complete.

Complete() Complete() Complete() Complete()

藉由呼叫 OnComplete() 方法完成編輯範圍。Completes the editing scope by calling the OnComplete() method.

(Inherited from ModelEditingScope)
Dispose() Dispose() Dispose() Dispose()

中止變更以處置這個物件,除非編輯範圍已經完成或還原。Disposes of this object by aborting changes unless the editing scope has already been completed or reverted.

(Inherited from ModelEditingScope)
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

中止變更以處置這個物件。Disposes of this object by aborting changes.

(Inherited from ModelEditingScope)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
OnComplete() OnComplete() OnComplete() OnComplete()

引發 Complete 事件。Raises the Complete event.

OnException(Exception) OnException(Exception) OnException(Exception) OnException(Exception)

處理指定的例外狀況。Handles the specified exception.

OnRevert(Boolean) OnRevert(Boolean) OnRevert(Boolean) OnRevert(Boolean)

引發 Revert 事件。Raises the Revert event.

Revert() Revert() Revert() Revert()

放棄在編輯範圍期間所做的變更。Abandons the changes made during the editing scope.

(Inherited from ModelEditingScope)
ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)