EmbeddedText.FromStream(String, Stream, SourceHashAlgorithm) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Constructs an EmbeddedText from stream content.
public static Microsoft.CodeAnalysis.EmbeddedText FromStream (string filePath, System.IO.Stream stream, Microsoft.CodeAnalysis.Text.SourceHashAlgorithm checksumAlgorithm = Microsoft.CodeAnalysis.Text.SourceHashAlgorithm.Sha1);
static member FromStream : string * System.IO.Stream * Microsoft.CodeAnalysis.Text.SourceHashAlgorithm -> Microsoft.CodeAnalysis.EmbeddedText
Public Shared Function FromStream (filePath As String, stream As Stream, Optional checksumAlgorithm As SourceHashAlgorithm = Microsoft.CodeAnalysis.Text.SourceHashAlgorithm.Sha1) As EmbeddedText
Parameters
- filePath
- String
The file path (pre-normalization) to use in the PDB.
- stream
- Stream
The stream.
- checksumAlgorithm
- SourceHashAlgorithm
Hash algorithm to use to calculate checksum of the text that's saved to PDB.
Returns
Exceptions
filePath
is null.
stream
is null.
filePath
is empty.
stream
doesn't support reading or seeking.
checksumAlgorithm
is not supported.
An I/O error occurs.
Remarks
Reads from the beginning of the stream. Leaves the stream open.