C# Class RazorPad.UI.Editors.AvalonEditDocumentAdapter

Wraps the AvalonEdit TextDocument to provide the IDocument interface.
Inheritance: IDocument
Datei anzeigen Open project: RazorPad/RazorPad

Public Methods

Method Description
AvalonEditDocumentAdapter ( ) : System

Creates a new document.

AvalonEditDocumentAdapter ( TextDocument document, IServiceProvider parentServiceProvider ) : System

Creates a new AvalonEditDocumentAdapter instance.

CreateAnchor ( int offset ) : ITextAnchor
CreateReader ( ) : System.IO.TextReader
CreateReader ( int offset, int length ) : System.IO.TextReader
CreateSnapshot ( ) : ITextBuffer
CreateSnapshot ( int offset, int length ) : ITextBuffer
EndUndoableAction ( ) : void
GetCharAt ( int offset ) : char
GetLine ( int lineNumber ) : IDocumentLine
GetLineForOffset ( int offset ) : IDocumentLine
GetService ( Type serviceType ) : object
GetText ( int offset, int length ) : string
Insert ( int offset, string text ) : void
Insert ( int offset, string text, AnchorMovementType defaultAnchorMovementType ) : void
OffsetToPosition ( int offset ) : Location
OpenUndoGroup ( ) : IDisposable
PositionToOffset ( int line, int column ) : int
Remove ( int offset, int length ) : void
Replace ( int offset, int length, string newText ) : void
Replace ( int offset, int length, string newText, ICSharpCode defaultAnchorMovementType ) : void
StartUndoableAction ( ) : void
ToLocation ( TextLocation position ) : Location
ToPosition ( Location location ) : TextLocation

Private Methods

Method Description
AttachEvents ( ) : void
DetachEvents ( ) : void
document_Changed ( object sender, ICSharpCode.AvalonEdit.Document.DocumentChangeEventArgs e ) : void
document_Changing ( object sender, ICSharpCode.AvalonEdit.Document.DocumentChangeEventArgs e ) : void

Method Details

AvalonEditDocumentAdapter() public method

Creates a new document.
public AvalonEditDocumentAdapter ( ) : System
return System

AvalonEditDocumentAdapter() public method

Creates a new AvalonEditDocumentAdapter instance.
public AvalonEditDocumentAdapter ( TextDocument document, IServiceProvider parentServiceProvider ) : System
document ICSharpCode.AvalonEdit.Document.TextDocument The document to wrap.
parentServiceProvider IServiceProvider The service provider used for GetService calls.
return System

CreateAnchor() public method

public CreateAnchor ( int offset ) : ITextAnchor
offset int
return ITextAnchor

CreateReader() public method

public CreateReader ( ) : System.IO.TextReader
return System.IO.TextReader

CreateReader() public method

public CreateReader ( int offset, int length ) : System.IO.TextReader
offset int
length int
return System.IO.TextReader

CreateSnapshot() public method

public CreateSnapshot ( ) : ITextBuffer
return ITextBuffer

CreateSnapshot() public method

public CreateSnapshot ( int offset, int length ) : ITextBuffer
offset int
length int
return ITextBuffer

EndUndoableAction() public method

public EndUndoableAction ( ) : void
return void

GetCharAt() public method

public GetCharAt ( int offset ) : char
offset int
return char

GetLine() public method

public GetLine ( int lineNumber ) : IDocumentLine
lineNumber int
return IDocumentLine

GetLineForOffset() public method

public GetLineForOffset ( int offset ) : IDocumentLine
offset int
return IDocumentLine

GetService() public method

public GetService ( Type serviceType ) : object
serviceType System.Type
return object

GetText() public method

public GetText ( int offset, int length ) : string
offset int
length int
return string

Insert() public method

public Insert ( int offset, string text ) : void
offset int
text string
return void

Insert() public method

public Insert ( int offset, string text, AnchorMovementType defaultAnchorMovementType ) : void
offset int
text string
defaultAnchorMovementType AnchorMovementType
return void

OffsetToPosition() public method

public OffsetToPosition ( int offset ) : Location
offset int
return Location

OpenUndoGroup() public method

public OpenUndoGroup ( ) : IDisposable
return IDisposable

PositionToOffset() public method

public PositionToOffset ( int line, int column ) : int
line int
column int
return int

Remove() public method

public Remove ( int offset, int length ) : void
offset int
length int
return void

Replace() public method

public Replace ( int offset, int length, string newText ) : void
offset int
length int
newText string
return void

Replace() public method

public Replace ( int offset, int length, string newText, ICSharpCode defaultAnchorMovementType ) : void
offset int
length int
newText string
defaultAnchorMovementType ICSharpCode
return void

StartUndoableAction() public method

public StartUndoableAction ( ) : void
return void

ToLocation() public static method

public static ToLocation ( TextLocation position ) : Location
position TextLocation
return Location

ToPosition() public static method

public static ToPosition ( Location location ) : TextLocation
location Location
return TextLocation