C# Class Microsoft.R.Components.Extensions.TextBufferExtensions

ファイルを表示 Open project: Microsoft/RTVS

Public Methods

Method Description
CanBeSavedInCurrentEncoding ( this textBuffer ) : bool

Checks if file contents can be saved to disk in the current encoding without data loss.

GetEncoding ( this textBuffer ) : Encoding

Checks if file contents can be saved to disk in the current encoding without data loss.

GetFilePath ( this textBuffer ) : string
IsContentEqualsOrdinal ( this textBuffer, ITrackingSpan span1, ITrackingSpan span2 ) : bool
IsConververtibleTo ( this textBuffer, Encoding encoding ) : bool

Checks if file contents can be represented in the specified encoding without data loss.

Save ( this textBuffer, Encoding encoding = null ) : void
ToTextDocument ( this textBuffer ) : ITextDocument

Method Details

CanBeSavedInCurrentEncoding() public static method

Checks if file contents can be saved to disk in the current encoding without data loss.
public static CanBeSavedInCurrentEncoding ( this textBuffer ) : bool
textBuffer this
return bool

GetEncoding() public static method

Checks if file contents can be saved to disk in the current encoding without data loss.
public static GetEncoding ( this textBuffer ) : Encoding
textBuffer this
return System.Text.Encoding

GetFilePath() public static method

public static GetFilePath ( this textBuffer ) : string
textBuffer this
return string

IsContentEqualsOrdinal() public static method

public static IsContentEqualsOrdinal ( this textBuffer, ITrackingSpan span1, ITrackingSpan span2 ) : bool
textBuffer this
span1 ITrackingSpan
span2 ITrackingSpan
return bool

IsConververtibleTo() public static method

Checks if file contents can be represented in the specified encoding without data loss.
public static IsConververtibleTo ( this textBuffer, Encoding encoding ) : bool
textBuffer this
encoding System.Text.Encoding
return bool

Save() public static method

public static Save ( this textBuffer, Encoding encoding = null ) : void
textBuffer this
encoding System.Text.Encoding
return void

ToTextDocument() public static method

public static ToTextDocument ( this textBuffer ) : ITextDocument
textBuffer this
return ITextDocument