C# 클래스 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.
상속: IStateMachineIndentEngine
파일 보기 프로젝트 열기: 0xd4d/NRefactory 1 사용 예제들

공개 메소드들

메소드 설명
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

비공개 메소드들

메소드 설명
ICloneable ( ) : object
IDocumentIndentEngine ( ) : IDocumentIndentEngine

메소드 상세

CacheIndentEngine() 공개 메소드

Creates a new CacheIndentEngine instance from the given prototype.
public CacheIndentEngine ( CacheIndentEngine prototype ) : ICSharpCode.NRefactory.Editor
prototype CacheIndentEngine /// A CacheIndentEngine instance. ///
리턴 ICSharpCode.NRefactory.Editor

CacheIndentEngine() 공개 메소드

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. ///
리턴 ICSharpCode.NRefactory.Editor

Clone() 공개 메소드

public Clone ( ) : IStateMachineIndentEngine
리턴 IStateMachineIndentEngine

GetEngine() 공개 메소드

public GetEngine ( int offset ) : IStateMachineIndentEngine
offset int
리턴 IStateMachineIndentEngine

Push() 공개 메소드

public Push ( char ch ) : void
ch char
리턴 void

Reset() 공개 메소드

public Reset ( ) : void
리턴 void

ResetEngineToPosition() 공개 메소드

Resets the engine to offset. Clears all cached engines after the given offset.
public ResetEngineToPosition ( int offset ) : void
offset int
리턴 void

Update() 공개 메소드

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
리턴 void