6 instantiations of SourceFile
dotnet (3)
Commands\Run\VirtualProjectBuildingCommand.cs (3)
1604
new
SourceFile
(filePath, modifiedText).Save();
1640
return new
SourceFile
(filePath, SourceText.From(stream, Encoding.UTF8));
1645
return new
SourceFile
(Path, newText);
dotnet.Tests (3)
CommandTests\Project\Convert\DotnetProjectConvertTests.cs (2)
1282
var sourceFile = new
SourceFile
(filePath ?? "/app/Program.cs", SourceText.From(inputCSharp, Encoding.UTF8));
1309
var sourceFile = new
SourceFile
(programPath, SourceText.From(inputCSharp, Encoding.UTF8));
CommandTests\Run\FileBasedAppSourceEditorTests.cs (1)
13
return FileBasedAppSourceEditor.Load(new
SourceFile
("/app/Program.cs", SourceText.From(source, Encoding.UTF8)));
19 references to SourceFile
dotnet (17)
Commands\Package\Add\PackageAddCommand.cs (2)
254
var
file =
SourceFile
.Load(fullPath);
Commands\Package\Remove\PackageRemoveCommand.cs (1)
73
var editor = FileBasedAppSourceEditor.Load(
SourceFile
.Load(fullPath));
Commands\Project\Convert\ProjectConvertCommand.cs (2)
31
var
sourceFile =
SourceFile
.Load(file);
Commands\Run\Api\RunApiCommand.cs (2)
66
var
sourceFile =
SourceFile
.Load(EntryPointFileFullPath);
Commands\Run\FileBasedAppSourceEditor.cs (2)
18
public
SourceFile
SourceFile
52
public static FileBasedAppSourceEditor Load(
SourceFile
sourceFile)
Commands\Run\VirtualProjectBuildingCommand.cs (8)
172
var
sourceFile =
SourceFile
.Load(EntryPointFileFullPath);
1422
public static ImmutableArray<CSharpDirective> FindDirectives(
SourceFile
sourceFile, bool reportAllErrors, DiagnosticBag diagnostics)
1637
public static
SourceFile
Load(string filePath)
1643
public
SourceFile
WithText(SourceText newText)
1707
public required
SourceFile
SourceFile { get; init; }
1963
public void AddError(
SourceFile
sourceFile, TextSpan span, string message, Exception? inner = null)
1976
public T? AddError<T>(
SourceFile
sourceFile, TextSpan span, string message, Exception? inner = null)
dotnet.Tests (2)
CommandTests\Project\Convert\DotnetProjectConvertTests.cs (2)
1282
var
sourceFile = new SourceFile(filePath ?? "/app/Program.cs", SourceText.From(inputCSharp, Encoding.UTF8));
1309
var
sourceFile = new SourceFile(programPath, SourceText.From(inputCSharp, Encoding.UTF8));