Class ModelChangeRecorder
Represents a recorder for changes to a model.
Inherited Members
Namespace: NMF.Models.Changes
Assembly: NMF.Models.dll
Syntax
public class ModelChangeRecorder
Constructors
| Edit this page View SourceModelChangeRecorder()
Creates a new instance
Declaration
public ModelChangeRecorder()
ModelChangeRecorder(bool)
Creates a new instance
Declaration
[Obsolete("isInvertible is actually ignored")]
public ModelChangeRecorder(bool isInvertible)
Parameters
Type | Name | Description |
---|---|---|
bool | isInvertible | ignored |
Properties
| Edit this page View SourceAttachedElement
Gets the attached model element or null, if the recorder is not attached.
Declaration
public IModelElement AttachedElement { get; }
Property Value
Type | Description |
---|---|
IModelElement |
IsRecording
Checks whether the recorder is attached to a model element.
Declaration
public bool IsRecording { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceGetModelChanges()
Returns previously recorded changes in a tree hierarchy.
Declaration
public ModelChangeSet GetModelChanges()
Returns
Type | Description |
---|---|
ModelChangeSet |
GetModelChangesAsync()
Starts a new task to get model changes asynchronously
Declaration
public Task<ModelChangeSet> GetModelChangesAsync()
Returns
Type | Description |
---|---|
Task<ModelChangeSet> |
Start(IModelElement)
Attaches the recorder to the given model element. The recorder will track all changes made to the given element and every element further down in the containment hierarchy.
Declaration
public void Start(IModelElement element)
Parameters
Type | Name | Description |
---|---|---|
IModelElement | element |
Stop()
Detaches the recorder, stopping the change tracking.
Declaration
public void Stop()