Aracılığıyla paylaş


SyntaxNode.GetText(Encoding, SourceHashAlgorithm) Method

Definition

Gets the full text of this node as a new SourceText instance.

public Microsoft.CodeAnalysis.Text.SourceText GetText (System.Text.Encoding encoding = default, Microsoft.CodeAnalysis.Text.SourceHashAlgorithm checksumAlgorithm = Microsoft.CodeAnalysis.Text.SourceHashAlgorithm.Sha1);
public Microsoft.CodeAnalysis.Text.SourceText GetText (System.Text.Encoding? encoding = default, Microsoft.CodeAnalysis.Text.SourceHashAlgorithm checksumAlgorithm = Microsoft.CodeAnalysis.Text.SourceHashAlgorithm.Sha1);
member this.GetText : System.Text.Encoding * Microsoft.CodeAnalysis.Text.SourceHashAlgorithm -> Microsoft.CodeAnalysis.Text.SourceText
Public Function GetText (Optional encoding As Encoding = Nothing, Optional checksumAlgorithm As SourceHashAlgorithm = Microsoft.CodeAnalysis.Text.SourceHashAlgorithm.Sha1) As SourceText

Parameters

encoding
Encoding

Encoding of the file that the text was read from or is going to be saved to. null if the encoding is unspecified. If the encoding is not specified the SourceText isn't debuggable. If an encoding-less SourceText is written to a file a UTF8 shall be used as a default.

checksumAlgorithm
SourceHashAlgorithm

Hash algorithm to use to calculate checksum of the text that's saved to PDB.

Returns

Exceptions

checksumAlgorithm is not supported.

Applies to