ITextBufferFactoryService2.CreateTextBuffer メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
オーバーロード
CreateTextBuffer(SnapshotSpan, IContentType) |
ITextBuffer指定した IContentType を使用して を作成し、 に含まれる指定されたテキストを |
CreateTextBuffer(TextReader, IContentType, Int64, String, Boolean) |
指定 |
CreateTextBuffer(SnapshotSpan, IContentType)
ITextBuffer指定した IContentType を使用して を作成し、 に含まれる指定されたテキストをspan
設定します。
public:
Microsoft::VisualStudio::Text::ITextBuffer ^ CreateTextBuffer(Microsoft::VisualStudio::Text::SnapshotSpan span, Microsoft::VisualStudio::Utilities::IContentType ^ contentType);
public Microsoft.VisualStudio.Text.ITextBuffer CreateTextBuffer(Microsoft.VisualStudio.Text.SnapshotSpan span, Microsoft.VisualStudio.Utilities.IContentType contentType);
abstract member CreateTextBuffer : Microsoft.VisualStudio.Text.SnapshotSpan * Microsoft.VisualStudio.Utilities.IContentType -> Microsoft.VisualStudio.Text.ITextBuffer
Public Function CreateTextBuffer (span As SnapshotSpan, contentType As IContentType) As ITextBuffer
パラメーター
- span
- SnapshotSpan
追加する最初のテキスト。
- contentType
- IContentType
新しい IContentType の ITextBuffer。
戻り値
ITextBuffer指定されたテキストと IContentTypeを持つ オブジェクト。
例外
span
または contentType
が null です。
注釈
このメソッドは、任意のスレッドで呼び出すことができます。 このメソッドは、呼び出されたスレッドで と ContentTypeChanged(ITextBuffer, IContentType, IContentType) を発生させますTextBufferCreated。
適用対象
CreateTextBuffer(TextReader, IContentType, Int64, String, Boolean)
指定contentType
した を使用して をITextBuffer作成し、指定した TextReader からデータを読み取って設定します。
public Microsoft.VisualStudio.Text.ITextBuffer CreateTextBuffer(System.IO.TextReader reader, Microsoft.VisualStudio.Utilities.IContentType contentType, long length = -1, string traceId = "", bool throwOnInvalidCharacters = false);
abstract member CreateTextBuffer : System.IO.TextReader * Microsoft.VisualStudio.Utilities.IContentType * int64 * string * bool -> Microsoft.VisualStudio.Text.ITextBuffer
Public Function CreateTextBuffer (reader As TextReader, contentType As IContentType, Optional length As Long = -1, Optional traceId As String = "", Optional throwOnInvalidCharacters As Boolean = false) As ITextBuffer
パラメーター
- reader
- TextReader
読み取り元の TextReader。
- contentType
- IContentType
contentType
新しい に含まれるテキストの 。ITextBuffer
- length
- Int64
テキスト リーダーをバックアップするファイルの長さ (既知の場合)。それ以外の場合は -1。
- traceId
- String
デバッグ トレースで使用される省略可能な識別子。
- throwOnInvalidCharacters
- Boolean
無効な文字が見つかった場合は、FileFormat 例外をスローします。
戻り値
ITextBuffer指定した TextReader と contentType
を持つオブジェクト。
例外
contentType
が null です。
注釈
このメソッドは、任意のスレッドで呼び出すことができます。 このメソッドは、呼び出されたスレッドで と ContentTypeChanged(ITextBuffer, IContentType, IContentType) を発生させますTextBufferCreated。