ITextDocumentFactoryService2.CreateAndLoadTextDocument 메서드

정의

ITextDocument 를 만들고 의 내용을 새 ITextBuffer에 로드합니다filePath.

public:
 Microsoft::VisualStudio::Text::ITextDocument ^ CreateAndLoadTextDocument(System::String ^ filePath, Microsoft::VisualStudio::Utilities::IContentType ^ contentType, bool attemptUtf8Detection, bool allowCompressedStorage, bool throwOnInvalidCharactersIfUnknownEncoding, [Runtime::InteropServices::Out] bool % characterSubstitutionsOccurred);
public Microsoft.VisualStudio.Text.ITextDocument CreateAndLoadTextDocument (string filePath, Microsoft.VisualStudio.Utilities.IContentType contentType, bool attemptUtf8Detection, bool allowCompressedStorage, bool throwOnInvalidCharactersIfUnknownEncoding, out bool characterSubstitutionsOccurred);
abstract member CreateAndLoadTextDocument : string * Microsoft.VisualStudio.Utilities.IContentType * bool * bool * bool * bool -> Microsoft.VisualStudio.Text.ITextDocument
Public Function CreateAndLoadTextDocument (filePath As String, contentType As IContentType, attemptUtf8Detection As Boolean, allowCompressedStorage As Boolean, throwOnInvalidCharactersIfUnknownEncoding As Boolean, ByRef characterSubstitutionsOccurred As Boolean) As ITextDocument

매개 변수

filePath
String

로드할 파일의 전체 경로입니다.

contentType
IContentType

IContentType에 대한 ITextBuffer입니다.

attemptUtf8Detection
Boolean

문서를 UTF-8 파일로 로드할지 여부입니다.

allowCompressedStorage
Boolean

큰 파일을 압축된 버퍼에 저장할 수 있습니다. 사용되지 않음: 전달된 값에 관계없이 내부적으로 true 사용됩니다.

throwOnInvalidCharactersIfUnknownEncoding
Boolean

잘못된 문자가 발생하고 잘 정의된 인코딩이 없는 경우 예외를 throw합니다.

characterSubstitutionsOccurred
Boolean

지정된 인코딩을 사용하여 일부 파일 바이트를 직접 변환할 수 없는 경우 true로 설정합니다.

반환

ITextDocument입니다.

예외

filePath 또는 contentType가 null입니다.

적용 대상