ITextDocumentFactoryService2.CreateAndLoadTextDocument Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
ITextDocument öğesini açan ve içeriğini filePath yeni ITextBufferbir içine yükleyen bir oluşturur.
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
Parametreler
- filePath
- String
Yüklenecek dosyanın tam yolu.
- contentType
- IContentType
IContentType için.ITextBuffer
- attemptUtf8Detection
- Boolean
Belgenin UTF-8 dosyası olarak yüklenmeye çalışılıp denenmeyeceği.
- allowCompressedStorage
- Boolean
Büyük dosyaların sıkıştırılmış arabellekte depolanmasına izin verin. Kullanım dışı: geçirilen değerden bağımsız olarak dahili olarak true kullanılır.
- throwOnInvalidCharactersIfUnknownEncoding
- Boolean
Geçersiz karakterlerle karşılaşılırsa ve iyi tanımlanmış bir kodlamamız yoksa bir özel durum oluşturur.
- characterSubstitutionsOccurred
- Boolean
Dosya baytlarından bazıları verilen kodlama kullanılarak doğrudan çevrilemiyorsa true olarak ayarlayın.
Döndürülenler
Bir ITextDocument.
Özel durumlar
filePath veya contentType null.