Class AdditionalSourceText
Represents an additional source text to be used in a test.
Inheritance
AdditionalSourceText
Assembly: Neon.Roslyn.Xunit.dll
Syntax
public class AdditionalSourceText : AdditionalText
Constructors
AdditionalSourceText(string, SourceText)
Declaration
public AdditionalSourceText(string path, SourceText text)
Parameters
AdditionalSourceText(string, Encoding, string, SourceHashAlgorithm)
Declaration
public AdditionalSourceText(string text = "", Encoding encoding = null, string path = "dummy", SourceHashAlgorithm checksumAlgorithm = SourceHashAlgorithm.Sha1)
Parameters
Properties
Path
The path to the source text.
Declaration
public override string Path { get; }
Property Value
Overrides
Methods
FromFile(string)
Helper method to get the source text from a file.
Declaration
public static AdditionalSourceText FromFile(string path)
Parameters
Type |
Name |
Description |
string |
path |
|
Returns
FromString(string)
Helper method to get the source text from a string.
Declaration
public static AdditionalSourceText FromString(string text)
Parameters
Type |
Name |
Description |
string |
text |
|
Returns
GetText(CancellationToken)
Declaration
public override SourceText GetText(CancellationToken cancellationToken = default)
Parameters
Returns
Overrides