ModelEditingScope ModelEditingScope ModelEditingScope 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.

public ref class ModelEditingScope abstract : IDisposable
public abstract class ModelEditingScope : IDisposable
type ModelEditingScope = class
    interface IDisposable
Public MustInherit Class ModelEditingScope
Implements IDisposable


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.


ModelEditingScope() ModelEditingScope() ModelEditingScope() ModelEditingScope()

Creates a new ModelEditingScope.


Description Description Description Description

Describes the group of changes. It can be changed anytime before the changes are committed.


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

Determines 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.

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

Completes the editing scope by calling the OnComplete() method.

Dispose() Dispose() Dispose() Dispose()

Disposes of this object by aborting changes unless the editing scope has already been completed or reverted.

Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Disposes of this object by aborting changes.

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()

Gets the Type of the current instance.

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

Creates a shallow copy of the current Object.

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

Performs the actual complete of the editing scope.

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

Handles an exception.

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

Performs the actual revert of the editing scope.

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

Abandons the changes made during the editing scope.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to