Class AbstractOperationConsolidator
Base class for operation consolidators. Derive from this class to save some implementation work.
Inheritance
Implements
Inherited Members
Namespace: Sdl.DesktopEditor.EditorApi.Implementation
Assembly: Sdl.DesktopEditor.EditorApi.dll
Syntax
public abstract class AbstractOperationConsolidator : IEditOperationVisitor
Constructors
AbstractOperationConsolidator(IAbstractEditOperation)
default constructor
Declaration
public AbstractOperationConsolidator(IAbstractEditOperation thisOperation)
Parameters
Type | Name | Description |
---|---|---|
IAbstract |
thisOperation |
Properties
AddThisOperationToList
When set to true this edit operation will be added to the end of the preceding
edit operations after consolidation. Set this to false
if this operation
is compensated for by consolidations.
Declaration
protected bool AddThisOperationToList { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
OperationsToRemove
edit operations that should be removed as part of the consolidation.
Declaration
protected List<IAbstractEditOperation> OperationsToRemove { get; set; }
Property Value
Type | Description |
---|---|
List<IAbstract |
PrecedingOperations
preceding edit operations
Declaration
protected List<IAbstractEditOperation> PrecedingOperations { get; set; }
Property Value
Type | Description |
---|---|
List<IAbstract |
ThisOperation
the subsequent operation being evaluated against the list of preceding operations
Declaration
protected IAbstractEditOperation ThisOperation { get; set; }
Property Value
Type | Description |
---|---|
IAbstract |
Methods
ApplyTo(List<IAbstractEditOperation>)
Apply the delete operation to the list of preceding operations to consolidate it as appropriate.
Declaration
public void ApplyTo(List<IAbstractEditOperation> precedingOperations)
Parameters
Type | Name | Description |
---|---|---|
List<IAbstract |
precedingOperations |
IsParentNode(INode, INode)
helper to determine if a node is a parent node of another node
Declaration
public static bool IsParentNode(INode nodeToTest, INode referenceNode)
Parameters
Returns
Type | Description |
---|---|
Boolean |
IsSameOrParentNode(INode, INode)
helper to determine if a node is the same or a parent node of another node
Declaration
public static bool IsSameOrParentNode(INode nodeToTest, INode referenceNode)
Parameters
Returns
Type | Description |
---|---|
Boolean |
VisitChangeGhostStatusOperation(IChangeGhostStatusOperation)
implement by consolidating this operation with a preceding ghost status change
Declaration
public abstract void VisitChangeGhostStatusOperation(IChangeGhostStatusOperation operation)
Parameters
Type | Name | Description |
---|---|---|
IChange |
operation |
VisitChangeTextOperation(IChangeTextOperation)
implement by consolidating this operation with a preceding text change
Declaration
public abstract void VisitChangeTextOperation(IChangeTextOperation operation)
Parameters
Type | Name | Description |
---|---|---|
IChange |
operation |
VisitDeleteNodeOperation(IDeleteNodeOperation)
implement by consolidating this operation with a preceding delete
Declaration
public abstract void VisitDeleteNodeOperation(IDeleteNodeOperation operation)
Parameters
Type | Name | Description |
---|---|---|
IDelete |
operation |
VisitInsertNodeOperation(IInsertNodeOperation)
implement by consolidating this operation with a preceding insert
Declaration
public abstract void VisitInsertNodeOperation(IInsertNodeOperation operation)
Parameters
Type | Name | Description |
---|---|---|
IInsert |
operation |