Export (0) Print
Expand All

ModelEditingScope Class

Represents a group of changes to the editing store. Change groups are transactional. The changes made under an editing scope can be committed or aborted as a unit.

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)

[<AbstractClass>]
type ModelEditingScope =  
    class 
        interface IDisposable 
    end

The ModelEditingScope type exposes the following members.

  NameDescription
Protected methodModelEditingScopeCreates a new ModelEditingScope.
Top

  NameDescription
Public propertyDescriptionDescribes the group of changes. It can be changed anytime before the changes are committed.
Top

  NameDescription
Protected methodCanCompleteDetermines whether OnComplete should be called, or whether the change should instead be reverted. Reasons for reverting might include a file cannot be checked out of a source control system for modification.
Public methodCompleteCompletes the editing scope by calling the OnComplete method.
Public methodDispose()Disposes of this object by aborting changes unless the editing scope has already been completed or reverted.
Protected methodDispose(Boolean)Disposes of this object by aborting changes.
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 the default hash function. (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 methodOnCompletePerforms the actual complete of the editing scope.
Protected methodOnExceptionHandles an exception.
Protected methodOnRevertPerforms the actual revert of the editing scope.
Public methodRevertAbandons the changes made during the editing scope.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

When an editing scope is committed, the editing store takes all changes that occurred within it and applies them to the model. If the editing scope’s Revert method is called, or the editing scope is disposed of before Complete is called, the editing scope will instead reverse the changes made to the underlying objects, reapplying state from the editing store. This provides a solid basis for an undo mechanism.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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.
Show:
© 2014 Microsoft