다음을 통해 공유


SourceText.From 메서드

정의

오버로드

From(String, Encoding, SourceHashAlgorithm)

문자열의 SourceText 텍스트에서 생성합니다.

From(Stream, Encoding, SourceHashAlgorithm, Boolean)
From(TextReader, Int32, Encoding, SourceHashAlgorithm)

문자열의 SourceText 텍스트에서 생성합니다.

From(Byte[], Int32, Encoding, SourceHashAlgorithm, Boolean)
From(Stream, Encoding, SourceHashAlgorithm, Boolean, Boolean)

스트림 콘텐츠에서 생성 SourceText 합니다.

From(Byte[], Int32, Encoding, SourceHashAlgorithm, Boolean, Boolean)

SourceText 바이트 배열에서 생성합니다.

From(String, Encoding, SourceHashAlgorithm)

Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs

문자열의 SourceText 텍스트에서 생성합니다.

public static Microsoft.CodeAnalysis.Text.SourceText From (string text, System.Text.Encoding encoding = default, Microsoft.CodeAnalysis.Text.SourceHashAlgorithm checksumAlgorithm = Microsoft.CodeAnalysis.Text.SourceHashAlgorithm.Sha1);
public static Microsoft.CodeAnalysis.Text.SourceText From (string text, System.Text.Encoding? encoding = default, Microsoft.CodeAnalysis.Text.SourceHashAlgorithm checksumAlgorithm = Microsoft.CodeAnalysis.Text.SourceHashAlgorithm.Sha1);
static member From : string * System.Text.Encoding * Microsoft.CodeAnalysis.Text.SourceHashAlgorithm -> Microsoft.CodeAnalysis.Text.SourceText
Public Shared Function From (text As String, Optional encoding As Encoding = Nothing, Optional checksumAlgorithm As SourceHashAlgorithm = Microsoft.CodeAnalysis.Text.SourceHashAlgorithm.Sha1) As SourceText

매개 변수

text
String

Text.

encoding
Encoding

파일을 읽거나 저장할 파일 text 의 인코딩입니다. null 인코딩이 지정되지 않은 경우 인코딩을 지정하지 않으면 결과를 SourceText 디버깅할 수 없습니다. 인코딩 없음 SourceText 이 파일에 UTF8 기록되는 경우 기본값으로 사용해야 합니다.

checksumAlgorithm
SourceHashAlgorithm

PDB에 저장된 텍스트의 체크섬을 계산하는 데 사용할 해시 알고리즘입니다.

반환

예외

text가 null입니다.

checksumAlgorithm은 지원되지 않습니다.

적용 대상

From(Stream, Encoding, SourceHashAlgorithm, Boolean)

Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
public:
 static Microsoft::CodeAnalysis::Text::SourceText ^ From(System::IO::Stream ^ stream, System::Text::Encoding ^ encoding, Microsoft::CodeAnalysis::Text::SourceHashAlgorithm checksumAlgorithm, bool throwIfBinaryDetected);
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static Microsoft.CodeAnalysis.Text.SourceText From (System.IO.Stream stream, System.Text.Encoding encoding, Microsoft.CodeAnalysis.Text.SourceHashAlgorithm checksumAlgorithm, bool throwIfBinaryDetected);
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static Microsoft.CodeAnalysis.Text.SourceText From (System.IO.Stream stream, System.Text.Encoding? encoding, Microsoft.CodeAnalysis.Text.SourceHashAlgorithm checksumAlgorithm, bool throwIfBinaryDetected);
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
static member From : System.IO.Stream * System.Text.Encoding * Microsoft.CodeAnalysis.Text.SourceHashAlgorithm * bool -> Microsoft.CodeAnalysis.Text.SourceText
Public Shared Function From (stream As Stream, encoding As Encoding, checksumAlgorithm As SourceHashAlgorithm, throwIfBinaryDetected As Boolean) As SourceText

매개 변수

stream
Stream
encoding
Encoding
checksumAlgorithm
SourceHashAlgorithm
throwIfBinaryDetected
Boolean

반환

특성

적용 대상

From(TextReader, Int32, Encoding, SourceHashAlgorithm)

Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs

문자열의 SourceText 텍스트에서 생성합니다.

public static Microsoft.CodeAnalysis.Text.SourceText From (System.IO.TextReader reader, int length, System.Text.Encoding encoding = default, Microsoft.CodeAnalysis.Text.SourceHashAlgorithm checksumAlgorithm = Microsoft.CodeAnalysis.Text.SourceHashAlgorithm.Sha1);
public static Microsoft.CodeAnalysis.Text.SourceText From (System.IO.TextReader reader, int length, System.Text.Encoding? encoding = default, Microsoft.CodeAnalysis.Text.SourceHashAlgorithm checksumAlgorithm = Microsoft.CodeAnalysis.Text.SourceHashAlgorithm.Sha1);
static member From : System.IO.TextReader * int * System.Text.Encoding * Microsoft.CodeAnalysis.Text.SourceHashAlgorithm -> Microsoft.CodeAnalysis.Text.SourceText
Public Shared Function From (reader As TextReader, length As Integer, Optional encoding As Encoding = Nothing, Optional checksumAlgorithm As SourceHashAlgorithm = Microsoft.CodeAnalysis.Text.SourceHashAlgorithm.Sha1) As SourceText

매개 변수

reader
TextReader

TextReader

length
Int32

에서 콘텐츠의 길이 reader

encoding
Encoding

파일을 읽거나 저장할 파일 reader 의 인코딩입니다. null 인코딩이 지정되지 않은 경우 인코딩을 지정하지 않으면 결과를 SourceText 디버깅할 수 없습니다. 인코딩 없음 SourceText 이 파일에 UTF8 기록되는 경우 기본값으로 사용해야 합니다.

checksumAlgorithm
SourceHashAlgorithm

PDB에 저장된 텍스트의 체크섬을 계산하는 데 사용할 해시 알고리즘입니다.

반환

예외

reader가 null입니다.

checksumAlgorithm은 지원되지 않습니다.

적용 대상

From(Byte[], Int32, Encoding, SourceHashAlgorithm, Boolean)

Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
public:
 static Microsoft::CodeAnalysis::Text::SourceText ^ From(cli::array <System::Byte> ^ buffer, int length, System::Text::Encoding ^ encoding, Microsoft::CodeAnalysis::Text::SourceHashAlgorithm checksumAlgorithm, bool throwIfBinaryDetected);
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static Microsoft.CodeAnalysis.Text.SourceText From (byte[] buffer, int length, System.Text.Encoding encoding, Microsoft.CodeAnalysis.Text.SourceHashAlgorithm checksumAlgorithm, bool throwIfBinaryDetected);
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static Microsoft.CodeAnalysis.Text.SourceText From (byte[] buffer, int length, System.Text.Encoding? encoding, Microsoft.CodeAnalysis.Text.SourceHashAlgorithm checksumAlgorithm, bool throwIfBinaryDetected);
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
static member From : byte[] * int * System.Text.Encoding * Microsoft.CodeAnalysis.Text.SourceHashAlgorithm * bool -> Microsoft.CodeAnalysis.Text.SourceText
Public Shared Function From (buffer As Byte(), length As Integer, encoding As Encoding, checksumAlgorithm As SourceHashAlgorithm, throwIfBinaryDetected As Boolean) As SourceText

매개 변수

buffer
Byte[]
length
Int32
encoding
Encoding
checksumAlgorithm
SourceHashAlgorithm
throwIfBinaryDetected
Boolean

반환

특성

적용 대상

From(Stream, Encoding, SourceHashAlgorithm, Boolean, Boolean)

Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs

스트림 콘텐츠에서 생성 SourceText 합니다.

public static Microsoft.CodeAnalysis.Text.SourceText From (System.IO.Stream stream, System.Text.Encoding encoding = default, Microsoft.CodeAnalysis.Text.SourceHashAlgorithm checksumAlgorithm = Microsoft.CodeAnalysis.Text.SourceHashAlgorithm.Sha1, bool throwIfBinaryDetected = false, bool canBeEmbedded = false);
public static Microsoft.CodeAnalysis.Text.SourceText From (System.IO.Stream stream, System.Text.Encoding? encoding = default, Microsoft.CodeAnalysis.Text.SourceHashAlgorithm checksumAlgorithm = Microsoft.CodeAnalysis.Text.SourceHashAlgorithm.Sha1, bool throwIfBinaryDetected = false, bool canBeEmbedded = false);
static member From : System.IO.Stream * System.Text.Encoding * Microsoft.CodeAnalysis.Text.SourceHashAlgorithm * bool * bool -> Microsoft.CodeAnalysis.Text.SourceText
Public Shared Function From (stream As Stream, Optional encoding As Encoding = Nothing, Optional checksumAlgorithm As SourceHashAlgorithm = Microsoft.CodeAnalysis.Text.SourceHashAlgorithm.Sha1, Optional throwIfBinaryDetected As Boolean = false, Optional canBeEmbedded As Boolean = false) As SourceText

매개 변수

stream
Stream

스트림입니다. 스트림을 검색할 수 있어야 합니다.

encoding
Encoding

스트림이 인코딩을 지정하는 바이트 순서 표시로 시작되지 않는 경우 사용할 데이터 인코딩입니다. 지정되지 않은 경우 UTF8입니다.

checksumAlgorithm
SourceHashAlgorithm

PDB에 저장된 텍스트의 체크섬을 계산하는 데 사용할 해시 알고리즘입니다.

throwIfBinaryDetected
Boolean

디코딩된 텍스트에 두 개 이상의 연속된 NUL 문자가 포함되어 있으면 throw InvalidDataException 됩니다.

canBeEmbedded
Boolean

텍스트를 PDB에 전달 FromSource(String, SourceText) 하고 포함할 수 있으면 True입니다.

반환

예외

stream가 null입니다.

stream 는 읽기 또는 검색을 지원하지 않습니다. checksumAlgorithm은 지원되지 않습니다.

지정된 인코딩이 throw 디코더를 대체로 사용하도록 설정된 경우

디코딩된 텍스트에서 두 개의 연속 NUL 문자가 검색되었으며 throwIfBinaryDetected true입니다.

I/O 오류가 발생했습니다.

설명

스트림의 시작 부분에서 읽습니다. 스트림을 열어 둡니다.

적용 대상

From(Byte[], Int32, Encoding, SourceHashAlgorithm, Boolean, Boolean)

Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs
Source:
SourceText.cs

SourceText 바이트 배열에서 생성합니다.

public static Microsoft.CodeAnalysis.Text.SourceText From (byte[] buffer, int length, System.Text.Encoding encoding = default, Microsoft.CodeAnalysis.Text.SourceHashAlgorithm checksumAlgorithm = Microsoft.CodeAnalysis.Text.SourceHashAlgorithm.Sha1, bool throwIfBinaryDetected = false, bool canBeEmbedded = false);
public static Microsoft.CodeAnalysis.Text.SourceText From (byte[] buffer, int length, System.Text.Encoding? encoding = default, Microsoft.CodeAnalysis.Text.SourceHashAlgorithm checksumAlgorithm = Microsoft.CodeAnalysis.Text.SourceHashAlgorithm.Sha1, bool throwIfBinaryDetected = false, bool canBeEmbedded = false);
static member From : byte[] * int * System.Text.Encoding * Microsoft.CodeAnalysis.Text.SourceHashAlgorithm * bool * bool -> Microsoft.CodeAnalysis.Text.SourceText
Public Shared Function From (buffer As Byte(), length As Integer, Optional encoding As Encoding = Nothing, Optional checksumAlgorithm As SourceHashAlgorithm = Microsoft.CodeAnalysis.Text.SourceHashAlgorithm.Sha1, Optional throwIfBinaryDetected As Boolean = false, Optional canBeEmbedded As Boolean = false) As SourceText

매개 변수

buffer
Byte[]

인코딩된 원본 버퍼입니다.

length
Int32

버퍼에서 읽을 바이트 수입니다.

encoding
Encoding

인코딩된 버퍼가 바이트 순서 표시로 시작되지 않는 경우 사용할 데이터 인코딩입니다. 지정되지 않은 경우 UTF8입니다.

checksumAlgorithm
SourceHashAlgorithm

PDB에 저장된 텍스트의 체크섬을 계산하는 데 사용할 해시 알고리즘입니다.

throwIfBinaryDetected
Boolean

디코딩된 텍스트에 두 개 이상의 연속된 NUL 문자가 포함되어 있으면 throw InvalidDataException 됩니다.

canBeEmbedded
Boolean

텍스트를 PDB에 전달 FromSource(String, SourceText) 하고 포함할 수 있으면 True입니다.

반환

디코딩된 텍스트입니다.

예외

buffer가 null인 경우

음수 length 이거나 .보다 buffer깁니다.

checksumAlgorithm은 지원되지 않습니다.

지정된 인코딩이 throw 디코더를 대체로 사용하도록 설정된 경우

디코딩된 텍스트에서 두 개의 연속 NUL 문자가 검색되었으며 throwIfBinaryDetected true입니다.

적용 대상