EditingScope Class

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.

System.Object
  System.Activities.Presentation.Model.ModelEditingScope
    System.Activities.Presentation.Model.EditingScope

Namespace:  System.Activities.Presentation.Model
Assembly:  System.Activities.Presentation (in System.Activities.Presentation.dll)

public class EditingScope : ModelEditingScope

The EditingScope type exposes the following members.

  NameDescription
Public propertyChangesGets a list of changes.
Public propertyDescriptionDescribes the group of changes. It can be changed anytime before the changes are committed. (Inherited from ModelEditingScope.)
Public propertyHasEffectiveChangesGets a Boolean that specifies whether changes have been applied to the editing scope.
Top

  NameDescription
Protected methodCanCompleteDetermines whether the current editing scope instance can complete. (Overrides ModelEditingScope.CanComplete().)
Public methodCompleteCompletes the editing scope by calling the OnComplete() method. (Inherited from ModelEditingScope.)
Public methodDispose()Disposes of this object by aborting changes unless the editing scope has already been completed or reverted. (Inherited from ModelEditingScope.)
Protected methodDispose(Boolean)Disposes of this object by aborting changes. (Inherited from ModelEditingScope.)
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodOnCompleteRaises the Complete event. (Overrides ModelEditingScope.OnComplete().)
Protected methodOnExceptionHandles the specified exception. (Overrides ModelEditingScope.OnException(Exception).)
Protected methodOnRevertRaises the Revert event. (Overrides ModelEditingScope.OnRevert(Boolean).)
Public methodRevertAbandons the changes made during the editing scope. (Inherited from ModelEditingScope.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

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

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft