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