다음을 통해 공유


ITextBufferFactoryService2.CreateTextBuffer 메서드

정의

오버로드

CreateTextBuffer(SnapshotSpan, IContentType)

지정된 를 ITextBuffer 사용하여 을 IContentType 만들고 에 포함된 span지정된 텍스트로 채웁니다.

CreateTextBuffer(TextReader, IContentType, Int64, String, Boolean)

지정된 contentType 를 사용하여 를 ITextBuffer 만들고 지정된 TextReader에서 데이터를 읽어 채웁니다.

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

IContentTypeITextBuffer입니다.

반환

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 예외를 throw합니다.

반환

ITextBuffer 지정된 TextReader 및 contentType가 있는 개체입니다.

예외

contentType가 null입니다.

설명

이 메서드는 모든 스레드에서 호출할 수 있습니다. 이 메서드는 호출된 스레드에서 및 ContentTypeChanged(ITextBuffer, IContentType, IContentType) 를 발생 TextBufferCreated 합니다.

적용 대상