add new file v2

This commit is contained in:
Matt Parker
2025-10-19 20:47:59 +10:00
parent 5e1f1dfdd6
commit b180f82b1f
8 changed files with 37 additions and 18 deletions

View File

@@ -745,7 +745,7 @@ public class RoslynAnalysis
using var _ = SharpIdeOtel.Source.StartActivity($"{nameof(RoslynAnalysis)}.{nameof(AddDocument)}");
await _solutionLoadedTcs.Task;
Guard.Against.Null(fileModel, nameof(fileModel));
Guard.Against.NullOrEmpty(content, nameof(content));
Guard.Against.Null(content, nameof(content));
var project = _workspace!.CurrentSolution.Projects.Single(s => s.FilePath == ((IChildSharpIdeNode)fileModel).GetNearestProjectNode()!.FilePath);