diff --git a/Directory.Packages.props b/Directory.Packages.props index 08a8d12..bee1208 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -46,6 +46,12 @@ + + + + + + diff --git a/SharpIDE.Photino.sln b/SharpIDE.Photino.sln index 8cf9dab..4f06860 100644 --- a/SharpIDE.Photino.sln +++ b/SharpIDE.Photino.sln @@ -12,6 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Directory.Build.props = Directory.Build.props global.json = global.json README.md = README.md + Directory.Packages.props = Directory.Packages.props EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpIDE.Photino", "src\SharpIDE.Photino\SharpIDE.Photino.csproj", "{E35167E1-0FF4-4194-97A8-CC95EDA224CD}" @@ -24,6 +25,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Roslyn.Benchmarks", "tests\ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpIDE.RazorAccess", "src\SharpIDE.RazorAccess\SharpIDE.RazorAccess.csproj", "{0DE5B721-4C17-4A93-A94B-5DEA9CAAAE99}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{DABBDFD2-C631-439C-9ACB-EDDF659D5257}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspNetCoreServiceDefaults", "tools\AspNetCoreServiceDefaults\AspNetCoreServiceDefaults.csproj", "{C54A5E24-8F16-413F-87F1-BD5E57D2AC1E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppHost", "tools\AppHost\AppHost.csproj", "{CF00AC9C-F796-4C23-8D69-370F494999D7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpIDE.Godot", "src\SharpIDE.Godot\SharpIDE.Godot.csproj", "{D306410D-3A28-4F1B-A09B-CA10041A7C53}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -82,6 +91,42 @@ Global {0DE5B721-4C17-4A93-A94B-5DEA9CAAAE99}.Release|x64.Build.0 = Release|Any CPU {0DE5B721-4C17-4A93-A94B-5DEA9CAAAE99}.Release|x86.ActiveCfg = Release|Any CPU {0DE5B721-4C17-4A93-A94B-5DEA9CAAAE99}.Release|x86.Build.0 = Release|Any CPU + {C54A5E24-8F16-413F-87F1-BD5E57D2AC1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C54A5E24-8F16-413F-87F1-BD5E57D2AC1E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C54A5E24-8F16-413F-87F1-BD5E57D2AC1E}.Debug|x64.ActiveCfg = Debug|Any CPU + {C54A5E24-8F16-413F-87F1-BD5E57D2AC1E}.Debug|x64.Build.0 = Debug|Any CPU + {C54A5E24-8F16-413F-87F1-BD5E57D2AC1E}.Debug|x86.ActiveCfg = Debug|Any CPU + {C54A5E24-8F16-413F-87F1-BD5E57D2AC1E}.Debug|x86.Build.0 = Debug|Any CPU + {C54A5E24-8F16-413F-87F1-BD5E57D2AC1E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C54A5E24-8F16-413F-87F1-BD5E57D2AC1E}.Release|Any CPU.Build.0 = Release|Any CPU + {C54A5E24-8F16-413F-87F1-BD5E57D2AC1E}.Release|x64.ActiveCfg = Release|Any CPU + {C54A5E24-8F16-413F-87F1-BD5E57D2AC1E}.Release|x64.Build.0 = Release|Any CPU + {C54A5E24-8F16-413F-87F1-BD5E57D2AC1E}.Release|x86.ActiveCfg = Release|Any CPU + {C54A5E24-8F16-413F-87F1-BD5E57D2AC1E}.Release|x86.Build.0 = Release|Any CPU + {CF00AC9C-F796-4C23-8D69-370F494999D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CF00AC9C-F796-4C23-8D69-370F494999D7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CF00AC9C-F796-4C23-8D69-370F494999D7}.Debug|x64.ActiveCfg = Debug|Any CPU + {CF00AC9C-F796-4C23-8D69-370F494999D7}.Debug|x64.Build.0 = Debug|Any CPU + {CF00AC9C-F796-4C23-8D69-370F494999D7}.Debug|x86.ActiveCfg = Debug|Any CPU + {CF00AC9C-F796-4C23-8D69-370F494999D7}.Debug|x86.Build.0 = Debug|Any CPU + {CF00AC9C-F796-4C23-8D69-370F494999D7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CF00AC9C-F796-4C23-8D69-370F494999D7}.Release|Any CPU.Build.0 = Release|Any CPU + {CF00AC9C-F796-4C23-8D69-370F494999D7}.Release|x64.ActiveCfg = Release|Any CPU + {CF00AC9C-F796-4C23-8D69-370F494999D7}.Release|x64.Build.0 = Release|Any CPU + {CF00AC9C-F796-4C23-8D69-370F494999D7}.Release|x86.ActiveCfg = Release|Any CPU + {CF00AC9C-F796-4C23-8D69-370F494999D7}.Release|x86.Build.0 = Release|Any CPU + {D306410D-3A28-4F1B-A09B-CA10041A7C53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D306410D-3A28-4F1B-A09B-CA10041A7C53}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D306410D-3A28-4F1B-A09B-CA10041A7C53}.Debug|x64.ActiveCfg = Debug|Any CPU + {D306410D-3A28-4F1B-A09B-CA10041A7C53}.Debug|x64.Build.0 = Debug|Any CPU + {D306410D-3A28-4F1B-A09B-CA10041A7C53}.Debug|x86.ActiveCfg = Debug|Any CPU + {D306410D-3A28-4F1B-A09B-CA10041A7C53}.Debug|x86.Build.0 = Debug|Any CPU + {D306410D-3A28-4F1B-A09B-CA10041A7C53}.Release|Any CPU.ActiveCfg = Debug|Any CPU + {D306410D-3A28-4F1B-A09B-CA10041A7C53}.Release|Any CPU.Build.0 = Debug|Any CPU + {D306410D-3A28-4F1B-A09B-CA10041A7C53}.Release|x64.ActiveCfg = Debug|Any CPU + {D306410D-3A28-4F1B-A09B-CA10041A7C53}.Release|x64.Build.0 = Debug|Any CPU + {D306410D-3A28-4F1B-A09B-CA10041A7C53}.Release|x86.ActiveCfg = Debug|Any CPU + {D306410D-3A28-4F1B-A09B-CA10041A7C53}.Release|x86.Build.0 = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -91,5 +136,8 @@ Global {D7D5D39E-DA3A-4B10-8F40-B07B769347F4} = {F4ED837F-888A-4D01-BCED-C360B9CE0865} {252CE098-2F9A-4DA3-A172-EE1167B335BF} = {B6835010-35FA-4C74-AB48-009FB923185D} {0DE5B721-4C17-4A93-A94B-5DEA9CAAAE99} = {F4ED837F-888A-4D01-BCED-C360B9CE0865} + {C54A5E24-8F16-413F-87F1-BD5E57D2AC1E} = {DABBDFD2-C631-439C-9ACB-EDDF659D5257} + {CF00AC9C-F796-4C23-8D69-370F494999D7} = {DABBDFD2-C631-439C-9ACB-EDDF659D5257} + {D306410D-3A28-4F1B-A09B-CA10041A7C53} = {F4ED837F-888A-4D01-BCED-C360B9CE0865} EndGlobalSection EndGlobal diff --git a/src/SharpIDE.Application/Features/SolutionDiscovery/VsPersistence/IntermediateMapper.cs b/src/SharpIDE.Application/Features/SolutionDiscovery/VsPersistence/IntermediateMapper.cs index e945416..c93cef8 100644 --- a/src/SharpIDE.Application/Features/SolutionDiscovery/VsPersistence/IntermediateMapper.cs +++ b/src/SharpIDE.Application/Features/SolutionDiscovery/VsPersistence/IntermediateMapper.cs @@ -1,4 +1,5 @@ -using Ardalis.GuardClauses; +using System.Diagnostics; +using Ardalis.GuardClauses; using Microsoft.VisualStudio.SolutionPersistence.Model; using Microsoft.VisualStudio.SolutionPersistence.Serializer; @@ -9,6 +10,7 @@ public static class IntermediateMapper internal static async Task GetIntermediateModel(string solutionFilePath, CancellationToken cancellationToken = default) { + using var _ = SharpIdeOtel.Source.StartActivity(); var serializer = SolutionSerializers.GetSerializerByMoniker(solutionFilePath); Guard.Against.Null(serializer, nameof(serializer)); var vsSolution = await serializer.OpenAsync(solutionFilePath, cancellationToken); diff --git a/src/SharpIDE.Application/Features/SolutionDiscovery/VsPersistence/VsPersistenceMapper.cs b/src/SharpIDE.Application/Features/SolutionDiscovery/VsPersistence/VsPersistenceMapper.cs index b03e56a..f05b348 100644 --- a/src/SharpIDE.Application/Features/SolutionDiscovery/VsPersistence/VsPersistenceMapper.cs +++ b/src/SharpIDE.Application/Features/SolutionDiscovery/VsPersistence/VsPersistenceMapper.cs @@ -6,6 +6,7 @@ public static class VsPersistenceMapper { public static async Task GetSolutionModel(string solutionFilePath, CancellationToken cancellationToken = default) { + using var _ = SharpIdeOtel.Source.StartActivity(); var timer = Stopwatch.StartNew(); // This intermediate model is pretty much useless, but I have left it around as we grab the project nodes with it, which we might use later. var intermediateModel = await IntermediateMapper.GetIntermediateModel(solutionFilePath, cancellationToken); diff --git a/src/SharpIDE.Application/SharpIdeOtel.cs b/src/SharpIDE.Application/SharpIdeOtel.cs new file mode 100644 index 0000000..518c0da --- /dev/null +++ b/src/SharpIDE.Application/SharpIdeOtel.cs @@ -0,0 +1,10 @@ +using System.Diagnostics; +using System.Diagnostics.Metrics; + +namespace SharpIDE.Application; + +public static class SharpIdeOtel +{ + public static readonly ActivitySource Source = new("SharpIde"); + public static readonly Meter Meter = new("SharpIde"); +} diff --git a/src/SharpIDE.Godot/Features/IdeDiagnostics/IdeDiagnosticsPanel.cs b/src/SharpIDE.Godot/Features/IdeDiagnostics/IdeDiagnosticsPanel.cs index 7212c89..c1731a5 100644 --- a/src/SharpIDE.Godot/Features/IdeDiagnostics/IdeDiagnosticsPanel.cs +++ b/src/SharpIDE.Godot/Features/IdeDiagnostics/IdeDiagnosticsPanel.cs @@ -9,6 +9,8 @@ public partial class IdeDiagnosticsPanel : Control { _graphEdit = GetNode("%GraphEdit"); //_graphEdit.ConnectionRequest += GraphEditOnConnectionRequest; + //var graphNode = GetNode("%GraphNode"); + } // private void GraphEditOnConnectionRequest(StringName fromNode, long fromPort, StringName toNode, long toPort) diff --git a/src/SharpIDE.Godot/IdeRoot.cs b/src/SharpIDE.Godot/IdeRoot.cs index 07f04c2..45fcc80 100644 --- a/src/SharpIDE.Godot/IdeRoot.cs +++ b/src/SharpIDE.Godot/IdeRoot.cs @@ -1,5 +1,6 @@ using Godot; using Microsoft.Build.Locator; +using Microsoft.Extensions.Hosting; using SharpIDE.Application.Features.Analysis; using SharpIDE.Application.Features.SolutionDiscovery; using SharpIDE.Application.Features.SolutionDiscovery.VsPersistence; @@ -30,6 +31,7 @@ public partial class IdeRoot : Control public override void _Ready() { MSBuildLocator.RegisterDefaults(); + GodotServiceDefaults.AddServiceDefaults(); _openSlnButton = GetNode