C# Class ICSharpCode.NRefactory.CSharp.CacheIndentEngine

Represents a decorator of an IStateMachineIndentEngine instance that provides logic for reseting and updating the engine on text changed events.
The decorator is based on periodical caching of the engine's state and delegating all logic behind indentation to the currently active engine.
Inheritance: IStateMachineIndentEngine
Afficher le fichier Open project: 0xd4d/NRefactory Class Usage Examples

Méthodes publiques

Méthode Description
CacheIndentEngine ( CacheIndentEngine prototype ) : ICSharpCode.NRefactory.Editor

Creates a new CacheIndentEngine instance from the given prototype.

CacheIndentEngine ( IStateMachineIndentEngine decoratedEngine, int cacheRate = 2000 ) : ICSharpCode.NRefactory.Editor

Creates a new CacheIndentEngine instance.

Clone ( ) : IStateMachineIndentEngine
GetEngine ( int offset ) : IStateMachineIndentEngine
Push ( char ch ) : void
Reset ( ) : void
ResetEngineToPosition ( int offset ) : void

Resets the engine to offset. Clears all cached engines after the given offset.

Update ( int position ) : void If the position is negative, the engine will update to: document.TextLength + (offset % document.TextLength+1) Otherwise it will update to: offset % document.TextLength+1

Private Methods

Méthode Description
ICloneable ( ) : object
IDocumentIndentEngine ( ) : IDocumentIndentEngine

Method Details

CacheIndentEngine() public méthode

Creates a new CacheIndentEngine instance from the given prototype.
public CacheIndentEngine ( CacheIndentEngine prototype ) : ICSharpCode.NRefactory.Editor
prototype CacheIndentEngine /// A CacheIndentEngine instance. ///
Résultat ICSharpCode.NRefactory.Editor

CacheIndentEngine() public méthode

Creates a new CacheIndentEngine instance.
public CacheIndentEngine ( IStateMachineIndentEngine decoratedEngine, int cacheRate = 2000 ) : ICSharpCode.NRefactory.Editor
decoratedEngine IStateMachineIndentEngine /// An instance of to which the /// logic for indentation will be delegated. ///
cacheRate int /// The number of chars between caching. ///
Résultat ICSharpCode.NRefactory.Editor

Clone() public méthode

public Clone ( ) : IStateMachineIndentEngine
Résultat IStateMachineIndentEngine

GetEngine() public méthode

public GetEngine ( int offset ) : IStateMachineIndentEngine
offset int
Résultat IStateMachineIndentEngine

Push() public méthode

public Push ( char ch ) : void
ch char
Résultat void

Reset() public méthode

public Reset ( ) : void
Résultat void

ResetEngineToPosition() public méthode

Resets the engine to offset. Clears all cached engines after the given offset.
public ResetEngineToPosition ( int offset ) : void
offset int
Résultat void

Update() public méthode

If the position is negative, the engine will update to: document.TextLength + (offset % document.TextLength+1) Otherwise it will update to: offset % document.TextLength+1
public Update ( int position ) : void
position int
Résultat void