feat: scaffold P_Rec_Annot .NET 8 architecture
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
using System.Text.Json;
|
||||
using PRecAnnot.Abstractions;
|
||||
|
||||
namespace PRecAnnot.Telemetry;
|
||||
|
||||
public sealed class JsonlUsageSink(string path) : ICommandUsageSink
|
||||
{
|
||||
private readonly object _gate = new();
|
||||
public void Record(CommandUsageEvent usageEvent)
|
||||
{
|
||||
var json = JsonSerializer.Serialize(usageEvent);
|
||||
lock (_gate) File.AppendAllText(path, json + Environment.NewLine);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup><TargetFramework>net8.0</TargetFramework></PropertyGroup>
|
||||
<ItemGroup><ProjectReference Include="..\PRecAnnot.Abstractions\PRecAnnot.Abstractions.csproj" /></ItemGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user