6 instantiations of SourceFile
dotnet (3)
Commands\Run\VirtualProjectBuildingCommand.cs (1)
1470
new
SourceFile
(filePath, modifiedText).Save();
FileLevelDirectiveHelpers.cs (2)
235
return new
SourceFile
(filePath, SourceText.From(stream, Encoding.UTF8));
240
return new
SourceFile
(Path, newText);
dotnet.Tests (3)
CommandTests\Project\Convert\DotnetProjectConvertTests.cs (2)
1630
var sourceFile = new
SourceFile
(filePath ?? programPath, SourceText.From(inputCSharp, Encoding.UTF8));
1661
var sourceFile = new
SourceFile
(programPath, SourceText.From(inputCSharp, Encoding.UTF8));
CommandTests\Run\FileBasedAppSourceEditorTests.cs (1)
14
return FileBasedAppSourceEditor.Load(new
SourceFile
("/app/Program.cs", SourceText.From(source, Encoding.UTF8)));
20 references to SourceFile
dotnet (18)
Commands\Package\Add\PackageAddCommand.cs (2)
254
var
file =
SourceFile
.Load(fullPath);
Commands\Package\Remove\PackageRemoveCommand.cs (1)
74
var editor = FileBasedAppSourceEditor.Load(
SourceFile
.Load(fullPath));
Commands\Project\Convert\ProjectConvertCommand.cs (2)
33
var
sourceFile =
SourceFile
.Load(file);
Commands\Run\Api\RunApiCommand.cs (2)
67
var
sourceFile =
SourceFile
.Load(EntryPointFileFullPath);
Commands\Run\FileBasedAppSourceEditor.cs (2)
19
public
SourceFile
SourceFile
53
public static FileBasedAppSourceEditor Load(
SourceFile
sourceFile)
Commands\Run\VirtualProjectBuildingCommand.cs (2)
174
var
sourceFile =
SourceFile
.Load(EntryPointFileFullPath);
FileLevelDirectiveHelpers.cs (7)
43
public static ImmutableArray<CSharpDirective> FindDirectives(
SourceFile
sourceFile, bool reportAllErrors, DiagnosticBag diagnostics)
91
SourceFile
sourceFile,
232
public static
SourceFile
Load(string filePath)
238
public
SourceFile
WithText(SourceText newText)
299
public required
SourceFile
SourceFile { get; init; }
607
public void AddError(
SourceFile
sourceFile, TextSpan textSpan, string message, Exception? inner = null)
620
public T? AddError<T>(
SourceFile
sourceFile, TextSpan span, string message, Exception? inner = null)
dotnet.Tests (2)
CommandTests\Project\Convert\DotnetProjectConvertTests.cs (2)
1630
var
sourceFile = new SourceFile(filePath ?? programPath, SourceText.From(inputCSharp, Encoding.UTF8));
1661
var
sourceFile = new SourceFile(programPath, SourceText.From(inputCSharp, Encoding.UTF8));