diff --git a/GameParsers/ForzaParser.cs b/GameParsers/ForzaParser.cs index 07a5d51..ac8743f 100644 --- a/GameParsers/ForzaParser.cs +++ b/GameParsers/ForzaParser.cs @@ -69,8 +69,8 @@ public override ReportableInstruction GetPreRaceInstructions() } - RightTrigger.parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.Normal, 0, 0 }; - LeftTrigger.parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.Normal, 0, 0 }; + RightTrigger.Parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.Normal, 0, 0 }; + LeftTrigger.Parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.Normal, 0, 0 }; #region Light Bar color int CPIcolorR = 255; @@ -122,7 +122,7 @@ public override ReportableInstruction GetPreRaceInstructions() CPIcolorB = ColorClassX[2]; } - LightBar.parameters = new object[] { controllerIndex, CPIcolorR, CPIcolorG, CPIcolorB }; + LightBar.Parameters = new object[] { controllerIndex, CPIcolorR, CPIcolorG, CPIcolorB }; #endregion diff --git a/GameParsers/Parser.cs b/GameParsers/Parser.cs index ef51a79..e527971 100644 --- a/GameParsers/Parser.cs +++ b/GameParsers/Parser.cs @@ -49,9 +49,9 @@ public virtual bool IsRaceOn() public virtual ReportableInstruction GetPreRaceInstructions() { ReportableInstruction p = new ReportableInstruction(); - RightTrigger.parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.Normal, 0, 0 }; - LeftTrigger.parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.Normal, 0, 0 }; - LightBar.parameters = new object[] { controllerIndex, 220, 120, 220}; + RightTrigger.Parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.Normal, 0, 0 }; + LeftTrigger.Parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.Normal, 0, 0 }; + LightBar.Parameters = new object[] { controllerIndex, 220, 120, 220}; p.Instructions = new Instruction[] { LightBar, LeftTrigger, RightTrigger }; return p; @@ -80,7 +80,7 @@ public virtual ReportableInstruction GetInRaceLightbarInstruction() } // Set LightBar instruction - LightBar.parameters = new object[] { controllerIndex, RedChannel, GreenChannel, BlueChannel, Brightness }; + LightBar.Parameters = new object[] { controllerIndex, RedChannel, GreenChannel, BlueChannel, Brightness }; // Add report for verbose output reportableInstruction.RacingDSXReportStructs.Add(new RacingDSXReportStruct( @@ -110,7 +110,7 @@ public virtual ReportableInstruction GetInRaceLeftTriggerInstruction() if (brakeSettings.TriggerMode == Config.TriggerMode.Off) { - LeftTrigger.parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.Normal, 0, 0 }; + LeftTrigger.Parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.Normal, 0, 0 }; } // If losing grip, start to "vibrate" else if (bLosingBrakeGrip && brakeSettings.TriggerMode == Config.TriggerMode.Vibration) @@ -125,11 +125,11 @@ public virtual ReportableInstruction GetInRaceLeftTriggerInstruction() if (filteredFreq <= brakeSettings.MinVibration) { - LeftTrigger.parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.Resistance, 0, 0 }; + LeftTrigger.Parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.Resistance, 0, 0 }; } else { - LeftTrigger.parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.CustomTriggerValue, CustomTriggerValueMode.VibrateResistance, + LeftTrigger.Parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.CustomTriggerValue, CustomTriggerValueMode.VibrateResistance, filteredFreq *brakeSettings.EffectIntensity, filteredResistance * brakeSettings.EffectIntensity, brakeSettings.VibrationStart, 0, 0, 0, 0 }; } //Set left trigger to the custom mode VibrateResitance with values of Frequency = freq, Stiffness = 104, startPostion = 76. @@ -143,7 +143,7 @@ public virtual ReportableInstruction GetInRaceLeftTriggerInstruction() filteredResistance = (int)EWMA(resistance, lastBrakeResistance, brakeSettings.ResistanceSmoothing); lastBrakeResistance = filteredResistance; - LeftTrigger.parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.Resistance, 0, filteredResistance * brakeSettings.EffectIntensity }; + LeftTrigger.Parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.Resistance, 0, filteredResistance * brakeSettings.EffectIntensity }; reportableInstruction.RacingDSXReportStructs.Add(new RacingDSXReportStruct(VerboseLevel.Limited, RacingDSXReportStruct.ReportType.RACING, RacingDSXReportStruct.RacingReportType.BRAKE_VIBRATION, "")); @@ -177,7 +177,7 @@ public virtual ReportableInstruction GetInRaceRightTriggerInstruction() if (throttleSettings.TriggerMode == Config.TriggerMode.Off) { - RightTrigger.parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.Normal, 0, 0 }; + RightTrigger.Parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.Normal, 0, 0 }; } // If losing grip, start to "vibrate" else if (bLosingAccelGrip && throttleSettings.TriggerMode == Config.TriggerMode.Vibration) @@ -193,14 +193,14 @@ public virtual ReportableInstruction GetInRaceRightTriggerInstruction() if (filteredFreq <= throttleSettings.MinVibration || data.Accelerator <= throttleSettings.VibrationModeStart) { - RightTrigger.parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.Resistance, 0, filteredResistance * throttleSettings.EffectIntensity }; + RightTrigger.Parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.Resistance, 0, filteredResistance * throttleSettings.EffectIntensity }; filteredFreq = 0; filteredResistance = 0; } else { - RightTrigger.parameters = new object[] { + RightTrigger.Parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.CustomTriggerValue, CustomTriggerValueMode.VibrateResistance, filteredFreq * throttleSettings.EffectIntensity, filteredResistance * throttleSettings.EffectIntensity,throttleSettings.VibrationModeStart, 0, 0, 0, 0 }; } @@ -215,7 +215,7 @@ public virtual ReportableInstruction GetInRaceRightTriggerInstruction() filteredResistance = (int)EWMA(resistance, lastThrottleResistance, throttleSettings.ResistanceSmoothing); lastThrottleResistance = filteredResistance; - RightTrigger.parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.Resistance, 0, filteredResistance * throttleSettings.EffectIntensity }; + RightTrigger.Parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.Resistance, 0, filteredResistance * throttleSettings.EffectIntensity }; reportableInstruction.RacingDSXReportStructs.Add(new RacingDSXReportStruct(VerboseLevel.Limited, RacingDSXReportStruct.ReportType.RACING, RacingDSXReportStruct.RacingReportType.THROTTLE_VIBRATION, "")); diff --git a/Program.cs b/Program.cs index ebe43c5..10db7bf 100644 --- a/Program.cs +++ b/Program.cs @@ -1,6 +1,7 @@ using System; using System.Net; using System.Text.Json; +using System.Text.Json.Serialization; using System.Windows.Forms; namespace RacingDSX @@ -39,17 +40,40 @@ public static class Triggers { public static IPAddress localhost = new IPAddress(new byte[] { 127, 0, 0, 1 }); + private static readonly JsonSerializerOptions jsonOptions = new JsonSerializerOptions + { + PropertyNamingPolicy = JsonNamingPolicy.CamelCase, + WriteIndented = false, + Converters = { new JsonStringEnumConverter() } + }; + public static string PacketToJson(Packet packet) { - return JsonSerializer.Serialize(packet); + try + { + return JsonSerializer.Serialize(packet, jsonOptions); + } + catch (Exception ex) + { + throw new InvalidOperationException("Failed to serialize packet to JSON", ex); + } } public static Packet JsonToPacket(string json) { - return JsonSerializer.Deserialize(json); + try + { + return JsonSerializer.Deserialize(json, jsonOptions) + ?? throw new InvalidOperationException("Deserialized packet is null"); + } + catch (Exception ex) + { + throw new InvalidOperationException("Failed to deserialize JSON to packet", ex); + } } } + [JsonConverter(typeof(JsonStringEnumConverter))] public enum TriggerMode { Normal = 0, @@ -73,6 +97,7 @@ public enum TriggerMode Machine = 18 } + [JsonConverter(typeof(JsonStringEnumConverter))] public enum CustomTriggerValueMode { OFF = 0, @@ -94,6 +119,7 @@ public enum CustomTriggerValueMode VibratePulseAB = 16 } + [JsonConverter(typeof(JsonStringEnumConverter))] public enum Trigger { Invalid, @@ -101,6 +127,7 @@ public enum Trigger Right } + [JsonConverter(typeof(JsonStringEnumConverter))] public enum InstructionType { Invalid, @@ -110,18 +137,24 @@ public enum InstructionType TriggerThreshold } - public struct Instruction + public class Instruction { + [JsonConstructor] public Instruction(InstructionType type) { - this.type = type; + Type = type; } - public InstructionType type; - public object[] parameters; + + [JsonPropertyName("type")] + public InstructionType Type { get; set; } + + [JsonPropertyName("parameters")] + public object[] Parameters { get; set; } } public class Packet { - public Instruction[] instructions; + [JsonPropertyName("instructions")] + public Instruction[] Instructions { get; set; } } } \ No newline at end of file diff --git a/RacingDSX.csproj b/RacingDSX.csproj index 93f8e75..e8dba31 100644 --- a/RacingDSX.csproj +++ b/RacingDSX.csproj @@ -58,6 +58,7 @@ + diff --git a/RacingDSXWorker.cs b/RacingDSXWorker.cs index c60cf20..608e414 100644 --- a/RacingDSXWorker.cs +++ b/RacingDSXWorker.cs @@ -6,317 +6,315 @@ using System.Net.Sockets; using System.Runtime.InteropServices; using System.Text; +using System.Text.Json; namespace RacingDSX { - public enum InstructionTriggerMode : sbyte - { - NONE, - RESISTANCE, - VIBRATION - } - - public class RacingDSXWorker - { - public struct RacingDSXReportStruct - { - public enum ReportType : ushort - { - VERBOSEMESSAGE = 0, - NORACE = 1, - RACING = 2 - } - - public enum RacingReportType : ushort - { - // 0 = Throttle vibration message - THROTTLE_VIBRATION = 0, - // 1 = Throttle message - THROTTLE, - // 2 = Brake vibration message - BRAKE_VIBRATION, - // 3 = Brake message - BRAKE - } + public enum InstructionTriggerMode : sbyte + { + NONE, + RESISTANCE, + VIBRATION + } + + public class RacingDSXWorker + { + public struct RacingDSXReportStruct + { + public enum ReportType : ushort + { + VERBOSEMESSAGE = 0, + NORACE = 1, + RACING = 2 + } + + public enum RacingReportType : ushort + { + // 0 = Throttle vibration message + THROTTLE_VIBRATION = 0, + // 1 = Throttle message + THROTTLE, + // 2 = Brake vibration message + BRAKE_VIBRATION, + // 3 = Brake message + BRAKE + } public RacingDSXReportStruct(VerboseLevel level, ReportType type, RacingReportType racingType, string msg) { - this.verboseLevel = level; - this.type = type; + this.verboseLevel = level; + this.type = type; this.racingType = racingType; this.message = msg; } + public RacingDSXReportStruct(ReportType type, RacingReportType racingType, string msg) - { - this.type = type; - this.racingType = racingType; - this.message = msg; - } + { + this.type = type; + this.racingType = racingType; + this.message = msg; + } public RacingDSXReportStruct(VerboseLevel level, ReportType type, string msg) { - this.verboseLevel = level; + this.verboseLevel = level; this.type = type; this.message = msg; } public RacingDSXReportStruct(ReportType type, string msg) - { - this.type = type; - this.message = msg; - } + { + this.type = type; + this.message = msg; + } + public RacingDSXReportStruct(VerboseLevel level, string msg) { - this.verboseLevel = level; + this.verboseLevel = level; this.type = ReportType.VERBOSEMESSAGE; this.message = String.Empty; } public RacingDSXReportStruct(string msg) - { - this.type = ReportType.VERBOSEMESSAGE; - this.message = String.Empty; - } - - public ReportType type = 0; - public RacingReportType racingType = 0; - public string message = string.Empty; - public VerboseLevel verboseLevel = VerboseLevel.Limited; - } - - RacingDSX.Config.Config settings; - IProgress progressReporter; - Parser parser; - - - - - - public RacingDSXWorker(RacingDSX.Config.Config currentSettings, IProgress progressReporter) - { - settings = currentSettings; - this.progressReporter = progressReporter; - } - - public void SetSettings(RacingDSX.Config.Config currentSettings) - { - lock(this) - { - settings = currentSettings; - } - } - - //This sends the data to DSX based on the input parsed data from Forza. - //See DataPacket.cs for more details about what forza parameters can be accessed. - //See the Enums at the bottom of this file for details about commands that can be sent to DualSenseX - //Also see the Test Function below to see examples about those commands - void SendData() - { - Packet p = new Packet(); - // Parser parser = new ForzaParser(settings); - CsvData csvRecord = new CsvData(); - Profile activeProfile = settings.ActiveProfile; - ReportableInstruction reportableInstruction = new ReportableInstruction(); - - - // No race = normal triggers - if (!parser.IsRaceOn()) - { - - - reportableInstruction = parser.GetPreRaceInstructions(); - p.instructions = reportableInstruction.Instructions; - reportableInstruction.RacingDSXReportStructs.ForEach(x => - { - - if (x.verboseLevel <= settings.VerboseLevel - && progressReporter != null) - { - progressReporter.Report(x); - } - }); - - //Send the commands to DSX - Send(p); - } - else - { - reportableInstruction = parser.GetInRaceRightTriggerInstruction(); - sendReportableInstruction(reportableInstruction); - reportableInstruction = parser.GetInRaceLeftTriggerInstruction(); - sendReportableInstruction(reportableInstruction); - reportableInstruction = parser.GetInRaceLightbarInstruction(); - sendReportableInstruction(reportableInstruction); - - } - } - - private void sendReportableInstruction(ReportableInstruction reportableInstruction) - { - reportableInstruction.RacingDSXReportStructs.ForEach(x => - { + { + this.type = ReportType.VERBOSEMESSAGE; + this.message = String.Empty; + } + + public ReportType type = 0; + public RacingReportType racingType = 0; + public string message = string.Empty; + public VerboseLevel verboseLevel = VerboseLevel.Limited; + } + + private RacingDSX.Config.Config settings; + private IProgress progressReporter; + private Parser parser; + + // JSON serialization options + private static readonly JsonSerializerOptions jsonOptions = new JsonSerializerOptions + { + PropertyNamingPolicy = JsonNamingPolicy.CamelCase, + WriteIndented = false + }; + + public RacingDSXWorker(RacingDSX.Config.Config currentSettings, IProgress progressReporter) + { + settings = currentSettings; + this.progressReporter = progressReporter; + } - if (x.verboseLevel <= settings.VerboseLevel - && progressReporter != null) - { + public void SetSettings(RacingDSX.Config.Config currentSettings) + { + lock(this) + { + settings = currentSettings; + } + } + + void SendData() + { + Packet p = new Packet(); + CsvData csvRecord = new CsvData(); + Profile activeProfile = settings.ActiveProfile; + ReportableInstruction reportableInstruction = new ReportableInstruction(); + + // No race = normal triggers + if (!parser.IsRaceOn()) + { + reportableInstruction = parser.GetPreRaceInstructions(); + p.Instructions = reportableInstruction.Instructions; + reportableInstruction.RacingDSXReportStructs.ForEach(x => + { + if (x.verboseLevel <= settings.VerboseLevel && progressReporter != null) + { + progressReporter.Report(x); + } + }); + + //Send the commands to DSX + Send(p); + } + else + { + reportableInstruction = parser.GetInRaceRightTriggerInstruction(); + sendReportableInstruction(reportableInstruction); + reportableInstruction = parser.GetInRaceLeftTriggerInstruction(); + sendReportableInstruction(reportableInstruction); + reportableInstruction = parser.GetInRaceLightbarInstruction(); + sendReportableInstruction(reportableInstruction); + } + } + + private void sendReportableInstruction(ReportableInstruction reportableInstruction) + { + reportableInstruction.RacingDSXReportStructs.ForEach(x => + { + if (x.verboseLevel <= settings.VerboseLevel && progressReporter != null) + { progressReporter.Report(x); } }); - Packet p = new Packet(); - p.instructions = reportableInstruction.Instructions; + Packet p = new Packet(); + p.Instructions = reportableInstruction.Instructions; //Send the commands to DSX Send(p); } - //Maps floats from one range to another. - - - //private DataPacket data; - static UdpClient senderClient; - static IPEndPoint endPoint; - - // Connect to DSX - void Connect() - { - senderClient = new UdpClient(); - var portNumber = settings.DSXPort; - - if (progressReporter != null) - { - progressReporter.Report(new RacingDSXReportStruct("DSX is using port " + portNumber + ". Attempting to connect..")); - } - - int portNum; - - if (!int.TryParse(portNumber.ToString(), out portNum)) - { - // handle parse failure - } - { - if (progressReporter != null) - { - progressReporter.Report(new RacingDSXReportStruct($"DSX provided a non-numerical port! Using configured default ({settings.DSXPort}).")); - } - portNum = settings.DSXPort; - } - - endPoint = new IPEndPoint(Triggers.localhost, portNum); - - try - { - senderClient.Connect(endPoint); - } - catch (Exception e) - { - if (progressReporter != null) - { - progressReporter.Report(new RacingDSXReportStruct("Error connecting: " + e.Message)); - - if (e is SocketException) - { - progressReporter.Report(new RacingDSXReportStruct("Couldn't access port. " + e.Message)); - } - else if (e is ObjectDisposedException) - { - progressReporter.Report(new RacingDSXReportStruct("Connection object closed. Restart the application.")); - } - else - { - progressReporter.Report(new RacingDSXReportStruct("Unknown error: " + e.Message)); - } - } - } - } - - - //Send Data to DSX - void Send(Packet data) - { - if (settings.VerboseLevel > VerboseLevel.Limited - && progressReporter != null) - { - progressReporter.Report(new RacingDSXReportStruct($"Converting Message to JSON" )); - } - byte[] RequestData = Encoding.ASCII.GetBytes(Triggers.PacketToJson(data)); - if (settings.VerboseLevel > VerboseLevel.Limited - && progressReporter != null) - { - progressReporter.Report(new RacingDSXReportStruct($"{Encoding.ASCII.GetString(RequestData)}" )); - } - try - { - if (settings.VerboseLevel > VerboseLevel.Limited - && progressReporter != null) - { - progressReporter.Report(new RacingDSXReportStruct($"Sending Message to DSX..." )); - } - - senderClient.Send(RequestData, RequestData.Length); - - if (settings.VerboseLevel > VerboseLevel.Limited - && progressReporter != null) - { - progressReporter.Report(new RacingDSXReportStruct($"Message sent to DSX" )); - } - } - catch (Exception e) - { - if (progressReporter != null) - progressReporter.Report(new RacingDSXReportStruct("Error Sending Message: " )); - - if (e is SocketException) - { - if (progressReporter != null) - progressReporter.Report(new RacingDSXReportStruct("Couldn't Access Port. " + e.Message )); - throw e; - } - else if (e is ObjectDisposedException) - { - if (progressReporter != null) - progressReporter.Report(new RacingDSXReportStruct("Connection closed. Restarting...")); - Connect(); - } - else - { - if (progressReporter != null) - progressReporter.Report(new RacingDSXReportStruct("Unknown Error: " + e.Message)); - } - - } - } - - static IPEndPoint ipEndPoint = null; - static UdpClient client = null; - - public struct UdpState - { - public UdpClient u; - public IPEndPoint e; - - public UdpState(UdpClient u, IPEndPoint e) - { - this.u = u; - this.e = e; - } - } - - protected bool bRunning = false; - - public void Run() - { - bRunning = true; - try - { - Connect(); - if (settings.ActiveProfile == null) - { + static UdpClient senderClient; + static IPEndPoint endPoint; + + // Connect to DSX + void Connect() + { + senderClient = new UdpClient(); + var portNumber = settings.DSXPort; + + if (progressReporter != null) + { + progressReporter.Report(new RacingDSXReportStruct("DSX is using port " + portNumber + ". Attempting to connect..")); + } + + if (!int.TryParse(portNumber.ToString(), out int portNum)) + { + if (progressReporter != null) + { + progressReporter.Report(new RacingDSXReportStruct($"DSX provided a non-numerical port! Using configured default ({settings.DSXPort}).")); + } + portNum = settings.DSXPort; + } + + endPoint = new IPEndPoint(IPAddress.Loopback, portNum); + + try + { + senderClient.Connect(endPoint); + } + catch (Exception e) + { + if (progressReporter != null) + { + progressReporter.Report(new RacingDSXReportStruct("Error connecting: " + e.Message)); + + if (e is SocketException) + { + progressReporter.Report(new RacingDSXReportStruct("Couldn't access port. " + e.Message)); + } + else if (e is ObjectDisposedException) + { + progressReporter.Report(new RacingDSXReportStruct("Connection object closed. Restart the application.")); + } + else + { + progressReporter.Report(new RacingDSXReportStruct("Unknown error: " + e.Message)); + } + } + } + } + + //Send Data to DSX + void Send(Packet data) + { + if (settings.VerboseLevel > VerboseLevel.Limited && progressReporter != null) + { + progressReporter.Report(new RacingDSXReportStruct($"Converting Message to JSON")); + } + + try + { + string jsonString = JsonSerializer.Serialize(data, jsonOptions); + byte[] RequestData = Encoding.ASCII.GetBytes(jsonString); + + if (settings.VerboseLevel > VerboseLevel.Limited && progressReporter != null) + { + progressReporter.Report(new RacingDSXReportStruct($"{Encoding.ASCII.GetString(RequestData)}")); + } + + if (settings.VerboseLevel > VerboseLevel.Limited && progressReporter != null) + { + progressReporter.Report(new RacingDSXReportStruct($"Sending Message to DSX...")); + } + + senderClient.Send(RequestData, RequestData.Length); + + if (settings.VerboseLevel > VerboseLevel.Limited && progressReporter != null) + { + progressReporter.Report(new RacingDSXReportStruct($"Message sent to DSX")); + } + } + catch (JsonException je) + { + if (progressReporter != null) + { + progressReporter.Report(new RacingDSXReportStruct($"JSON Serialization Error: {je.Message}")); + } + } + catch (Exception e) + { + if (progressReporter != null) + { + progressReporter.Report(new RacingDSXReportStruct("Error Sending Message: ")); + } + + if (e is SocketException) + { + if (progressReporter != null) + { + progressReporter.Report(new RacingDSXReportStruct("Couldn't Access Port. " + e.Message)); + } + throw; + } + else if (e is ObjectDisposedException) + { + if (progressReporter != null) + { + progressReporter.Report(new RacingDSXReportStruct("Connection closed. Restarting...")); + } + Connect(); + } + else + { + if (progressReporter != null) + { + progressReporter.Report(new RacingDSXReportStruct("Unknown Error: " + e.Message)); + } + } + } + } + + static IPEndPoint ipEndPoint = null; + static UdpClient client = null; + + public struct UdpState + { + public UdpClient u; + public IPEndPoint e; + + public UdpState(UdpClient u, IPEndPoint e) + { + this.u = u; + this.e = e; + } + } + + protected bool bRunning = false; + + public void Run() + { + bRunning = true; + try + { + Connect(); + if (settings.ActiveProfile == null) + { if (progressReporter != null) - { + { progressReporter.Report(new RacingDSXReportStruct("No active profile selected. Exiting...")); } return; } - switch (settings.ActiveProfile.GameType) - { + + switch (settings.ActiveProfile.GameType) + { case GameTypes.Forza: parser = new ForzaParser(settings); break; @@ -327,205 +325,94 @@ public void Run() parser = new NullParser(settings); break; } - //parser = new ForzaParser(settings); - //Connect to Forza - ipEndPoint = new IPEndPoint(IPAddress.Loopback, settings.ActiveProfile.gameUDPPort); - client = new UdpClient(settings.ActiveProfile.gameUDPPort); - - DataPacket data; - byte[] resultBuffer; - //UdpReceiveResult receive; - - //Main loop, go until killed - while (bRunning) - { - //If Forza sends an update - resultBuffer = client.Receive(ref ipEndPoint); - if (resultBuffer == null) - continue; - //receive = await client.ReceiveAsync(); - if (settings.VerboseLevel > VerboseLevel.Limited - && progressReporter != null) - { - progressReporter.Report(new RacingDSXReportStruct("recieved Message from Forza!")); - } - //parse data - //var resultBuffer = receive.Buffer; - if (!AdjustToBufferType(resultBuffer.Length)) - { - // return; - } - //data = parseDirtData(resultBuffer); - parser.ParsePacket(resultBuffer); - if (settings.VerboseLevel > VerboseLevel.Limited - && progressReporter != null) - { - progressReporter.Report(new RacingDSXReportStruct("Data Parsed")); - } - - //Process and send data to DSX - SendData(); - } - } - catch (Exception e) - { - if (progressReporter != null) - { - progressReporter.Report(new RacingDSXReportStruct("Application encountered an exception: " + e.Message)); - } - } - finally - { - Stop(); - } - } - - public void Stop() - { - bRunning = false; - - if (settings.VerboseLevel > VerboseLevel.Off - && progressReporter != null) - { - progressReporter.Report(new RacingDSXReportStruct($"Cleaning Up")); - } - - if (client != null) - { - client.Close(); - client.Dispose(); - } - if (senderClient != null) - { - senderClient.Close(); - senderClient.Dispose(); - } - - if (settings.VerboseLevel > VerboseLevel.Off) - { - progressReporter.Report(new RacingDSXReportStruct($"Cleanup Finished. Exiting...")); - } - } - - - - - //Parses data from Forza into a DataPacket - /* DataPacket ParseData(byte[] packet) - { - DataPacket data = new DataPacket(); - - // sled - data.IsRaceOn = packet.IsRaceOn(); - data.TimestampMS = packet.TimestampMs(); - data.EngineMaxRpm = packet.EngineMaxRpm(); - data.EngineIdleRpm = packet.EngineIdleRpm(); - data.CurrentEngineRpm = packet.CurrentEngineRpm(); - data.AccelerationX = packet.AccelerationX(); - data.AccelerationY = packet.AccelerationY(); - data.AccelerationZ = packet.AccelerationZ(); - data.VelocityX = packet.VelocityX(); - data.VelocityY = packet.VelocityY(); - data.VelocityZ = packet.VelocityZ(); - data.AngularVelocityX = packet.AngularVelocityX(); - data.AngularVelocityY = packet.AngularVelocityY(); - data.AngularVelocityZ = packet.AngularVelocityZ(); - data.Yaw = packet.Yaw(); - data.Pitch = packet.Pitch(); - data.Roll = packet.Roll(); - data.NormalizedSuspensionTravelFrontLeft = packet.NormSuspensionTravelFl(); - data.NormalizedSuspensionTravelFrontRight = packet.NormSuspensionTravelFr(); - data.NormalizedSuspensionTravelRearLeft = packet.NormSuspensionTravelRl(); - data.NormalizedSuspensionTravelRearRight = packet.NormSuspensionTravelRr(); - data.TireSlipRatioFrontLeft = packet.TireSlipRatioFl(); - data.TireSlipRatioFrontRight = packet.TireSlipRatioFr(); - data.TireSlipRatioRearLeft = packet.TireSlipRatioRl(); - data.TireSlipRatioRearRight = packet.TireSlipRatioRr(); - data.WheelRotationSpeedFrontLeft = packet.WheelRotationSpeedFl(); - data.WheelRotationSpeedFrontRight = packet.WheelRotationSpeedFr(); - data.WheelRotationSpeedRearLeft = packet.WheelRotationSpeedRl(); - data.WheelRotationSpeedRearRight = packet.WheelRotationSpeedRr(); - data.WheelOnRumbleStripFrontLeft = packet.WheelOnRumbleStripFl(); - data.WheelOnRumbleStripFrontRight = packet.WheelOnRumbleStripFr(); - data.WheelOnRumbleStripRearLeft = packet.WheelOnRumbleStripRl(); - data.WheelOnRumbleStripRearRight = packet.WheelOnRumbleStripRr(); - data.WheelInPuddleDepthFrontLeft = packet.WheelInPuddleFl(); - data.WheelInPuddleDepthFrontRight = packet.WheelInPuddleFr(); - data.WheelInPuddleDepthRearLeft = packet.WheelInPuddleRl(); - data.WheelInPuddleDepthRearRight = packet.WheelInPuddleRr(); - data.SurfaceRumbleFrontLeft = packet.SurfaceRumbleFl(); - data.SurfaceRumbleFrontRight = packet.SurfaceRumbleFr(); - data.SurfaceRumbleRearLeft = packet.SurfaceRumbleRl(); - data.SurfaceRumbleRearRight = packet.SurfaceRumbleRr(); - data.TireSlipAngleFrontLeft = packet.TireSlipAngleFl(); - data.TireSlipAngleFrontRight = packet.TireSlipAngleFr(); - data.TireSlipAngleRearLeft = packet.TireSlipAngleRl(); - data.TireSlipAngleRearRight = packet.TireSlipAngleRr(); - data.TireCombinedSlipFrontLeft = packet.TireCombinedSlipFl(); - data.TireCombinedSlipFrontRight = packet.TireCombinedSlipFr(); - data.TireCombinedSlipRearLeft = packet.TireCombinedSlipRl(); - data.TireCombinedSlipRearRight = packet.TireCombinedSlipRr(); - data.SuspensionTravelMetersFrontLeft = packet.SuspensionTravelMetersFl(); - data.SuspensionTravelMetersFrontRight = packet.SuspensionTravelMetersFr(); - data.SuspensionTravelMetersRearLeft = packet.SuspensionTravelMetersRl(); - data.SuspensionTravelMetersRearRight = packet.SuspensionTravelMetersRr(); - data.CarOrdinal = packet.CarOrdinal(); - data.CarClass = packet.CarClass(); - data.CarPerformanceIndex = packet.CarPerformanceIndex(); - data.DrivetrainType = packet.DriveTrain(); - data.NumCylinders = packet.NumCylinders(); - - // dash - data.PositionX = packet.PositionX(); - data.PositionY = packet.PositionY(); - data.PositionZ = packet.PositionZ(); - data.Speed = packet.Speed(); - data.Power = packet.Power(); - data.Torque = packet.Torque(); - data.TireTempFl = packet.TireTempFl(); - data.TireTempFr = packet.TireTempFr(); - data.TireTempRl = packet.TireTempRl(); - data.TireTempRr = packet.TireTempRr(); - data.Boost = packet.Boost(); - data.Fuel = packet.Fuel(); - data.Distance = packet.Distance(); - data.BestLapTime = packet.BestLapTime(); - data.LastLapTime = packet.LastLapTime(); - data.CurrentLapTime = packet.CurrentLapTime(); - data.CurrentRaceTime = packet.CurrentRaceTime(); - data.Lap = packet.Lap(); - data.RacePosition = packet.RacePosition(); - data.Accelerator = packet.Accelerator(); - data.Brake = packet.Brake(); - data.Clutch = packet.Clutch(); - data.Handbrake = packet.Handbrake(); - data.Gear = packet.Gear(); - data.Steer = packet.Steer(); - data.NormalDrivingLine = packet.NormalDrivingLine(); - data.NormalAiBrakeDifference = packet.NormalAiBrakeDifference(); - - return data; - }*/ - - //Support different standards - static bool AdjustToBufferType(int bufferLength) - { - switch (bufferLength) - { - case 232: // FM7 sled - return false; - case 311: // FM7 dash - FMData.BufferOffset = 0; - return true; - case 331: // FM8 dash - FMData.BufferOffset = 0; - return true; - case 324: // FH4 - FMData.BufferOffset = 12; - return true; - default: - return false; - } - } - } -} + + ipEndPoint = new IPEndPoint(IPAddress.Loopback, settings.ActiveProfile.gameUDPPort); + client = new UdpClient(settings.ActiveProfile.gameUDPPort); + + byte[] resultBuffer; + + while (bRunning) + { + resultBuffer = client.Receive(ref ipEndPoint); + if (resultBuffer == null) + continue; + + if (settings.VerboseLevel > VerboseLevel.Limited && progressReporter != null) + { + progressReporter.Report(new RacingDSXReportStruct("received Message from Forza!")); + } + + if (!AdjustToBufferType(resultBuffer.Length)) + { + continue; + } + + parser.ParsePacket(resultBuffer); + if (settings.VerboseLevel > VerboseLevel.Limited && progressReporter != null) + { + progressReporter.Report(new RacingDSXReportStruct("Data Parsed")); + } + + SendData(); + } + } + catch (Exception e) + { + if (progressReporter != null) + { + progressReporter.Report(new RacingDSXReportStruct("Application encountered an exception: " + e.Message)); + } + } + finally + { + Stop(); + } + } + + public void Stop() + { + bRunning = false; + + if (settings.VerboseLevel > VerboseLevel.Off && progressReporter != null) + { + progressReporter.Report(new RacingDSXReportStruct($"Cleaning Up")); + } + + if (client != null) + { + client.Close(); + client.Dispose(); + } + if (senderClient != null) + { + senderClient.Close(); + senderClient.Dispose(); + } + + if (settings.VerboseLevel > VerboseLevel.Off) + { + progressReporter.Report(new RacingDSXReportStruct($"Cleanup Finished. Exiting...")); + } + } + + static bool AdjustToBufferType(int bufferLength) + { + switch (bufferLength) + { + case 232: // FM7 sled + return false; + case 311: // FM7 dash + FMData.BufferOffset = 0; + return true; + case 331: // FM8 dash + FMData.BufferOffset = 0; + return true; + case 324: // FH4 + FMData.BufferOffset = 12; + return true; + default: + return false; + } + } + } +} \ No newline at end of file diff --git a/obj/project.assets.json b/obj/project.assets.json index 926b87a..cc6175a 100644 --- a/obj/project.assets.json +++ b/obj/project.assets.json @@ -209,6 +209,19 @@ "build": { "buildTransitive/net8.0/_._": {} } + }, + "Newtonsoft.Json/13.0.3": { + "type": "package", + "compile": { + "lib/net6.0/Newtonsoft.Json.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/Newtonsoft.Json.dll": { + "related": ".xml" + } + } } }, "net8.0-windows7.0/win-x64": { @@ -419,6 +432,19 @@ "build": { "buildTransitive/net8.0/_._": {} } + }, + "Newtonsoft.Json/13.0.3": { + "type": "package", + "compile": { + "lib/net6.0/Newtonsoft.Json.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/Newtonsoft.Json.dll": { + "related": ".xml" + } + } } } }, @@ -741,6 +767,36 @@ "microsoft.extensions.primitives.nuspec", "useSharedDesignerContext.txt" ] + }, + "Newtonsoft.Json/13.0.3": { + "sha512": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==", + "type": "package", + "path": "newtonsoft.json/13.0.3", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "LICENSE.md", + "README.md", + "lib/net20/Newtonsoft.Json.dll", + "lib/net20/Newtonsoft.Json.xml", + "lib/net35/Newtonsoft.Json.dll", + "lib/net35/Newtonsoft.Json.xml", + "lib/net40/Newtonsoft.Json.dll", + "lib/net40/Newtonsoft.Json.xml", + "lib/net45/Newtonsoft.Json.dll", + "lib/net45/Newtonsoft.Json.xml", + "lib/net6.0/Newtonsoft.Json.dll", + "lib/net6.0/Newtonsoft.Json.xml", + "lib/netstandard1.0/Newtonsoft.Json.dll", + "lib/netstandard1.0/Newtonsoft.Json.xml", + "lib/netstandard1.3/Newtonsoft.Json.dll", + "lib/netstandard1.3/Newtonsoft.Json.xml", + "lib/netstandard2.0/Newtonsoft.Json.dll", + "lib/netstandard2.0/Newtonsoft.Json.xml", + "newtonsoft.json.13.0.3.nupkg.sha512", + "newtonsoft.json.nuspec", + "packageIcon.png" + ] } }, "projectFileDependencyGroups": { @@ -748,28 +804,29 @@ "CsvHelper >= 33.0.1", "Microsoft.Extensions.Configuration.Binder >= 9.0.0", "Microsoft.Extensions.Configuration.EnvironmentVariables >= 9.0.0", - "Microsoft.Extensions.Configuration.Ini >= 9.0.0" + "Microsoft.Extensions.Configuration.Ini >= 9.0.0", + "Newtonsoft.Json >= 13.0.3" ] }, "packageFolders": { - "C:\\Users\\KennethTuisk\\.nuget\\packages\\": {}, + "C:\\Users\\apple\\.nuget\\packages\\": {}, "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} }, "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\KennethTuisk\\RiderProjects\\RacingDSX\\RacingDSX.csproj", + "projectUniqueName": "C:\\Users\\apple\\RiderProjects\\RacingDSX\\RacingDSX.csproj", "projectName": "RacingDSX", - "projectPath": "C:\\Users\\KennethTuisk\\RiderProjects\\RacingDSX\\RacingDSX.csproj", - "packagesPath": "C:\\Users\\KennethTuisk\\.nuget\\packages\\", - "outputPath": "C:\\Users\\KennethTuisk\\RiderProjects\\RacingDSX\\obj\\", + "projectPath": "C:\\Users\\apple\\RiderProjects\\RacingDSX\\RacingDSX.csproj", + "packagesPath": "C:\\Users\\apple\\.nuget\\packages\\", + "outputPath": "C:\\Users\\apple\\RiderProjects\\RacingDSX\\obj\\", "projectStyle": "PackageReference", "UsingMicrosoftNETSdk": false, "fallbackFolders": [ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" ], "configFilePaths": [ - "C:\\Users\\KennethTuisk\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Users\\apple\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" ], @@ -794,7 +851,7 @@ "restoreAuditProperties": { "enableAudit": "true", "auditLevel": "low", - "auditMode": "direct" + "auditMode": "all" } }, "frameworks": { @@ -816,6 +873,10 @@ "Microsoft.Extensions.Configuration.Ini": { "target": "Package", "version": "[9.0.0, )" + }, + "Newtonsoft.Json": { + "target": "Package", + "version": "[13.0.3, )" } }, "imports": [ @@ -837,7 +898,7 @@ "privateAssets": "none" } }, - "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.101/PortableRuntimeIdentifierGraph.json" + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100/PortableRuntimeIdentifierGraph.json" } }, "runtimes": { diff --git a/obj/project.nuget.cache b/obj/project.nuget.cache index e293dc2..ff06fe6 100644 --- a/obj/project.nuget.cache +++ b/obj/project.nuget.cache @@ -1,20 +1,21 @@ { "version": 2, - "dgSpecHash": "q1NBTf4rSNA=", + "dgSpecHash": "tiLd3/+mwxw=", "success": true, - "projectFilePath": "C:\\Users\\KennethTuisk\\RiderProjects\\RacingDSX\\RacingDSX.csproj", + "projectFilePath": "C:\\Users\\apple\\RiderProjects\\RacingDSX\\RacingDSX.csproj", "expectedPackageFiles": [ - "C:\\Users\\KennethTuisk\\.nuget\\packages\\csvhelper\\33.0.1\\csvhelper.33.0.1.nupkg.sha512", - "C:\\Users\\KennethTuisk\\.nuget\\packages\\microsoft.extensions.configuration\\9.0.0\\microsoft.extensions.configuration.9.0.0.nupkg.sha512", - "C:\\Users\\KennethTuisk\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\9.0.0\\microsoft.extensions.configuration.abstractions.9.0.0.nupkg.sha512", - "C:\\Users\\KennethTuisk\\.nuget\\packages\\microsoft.extensions.configuration.binder\\9.0.0\\microsoft.extensions.configuration.binder.9.0.0.nupkg.sha512", - "C:\\Users\\KennethTuisk\\.nuget\\packages\\microsoft.extensions.configuration.environmentvariables\\9.0.0\\microsoft.extensions.configuration.environmentvariables.9.0.0.nupkg.sha512", - "C:\\Users\\KennethTuisk\\.nuget\\packages\\microsoft.extensions.configuration.fileextensions\\9.0.0\\microsoft.extensions.configuration.fileextensions.9.0.0.nupkg.sha512", - "C:\\Users\\KennethTuisk\\.nuget\\packages\\microsoft.extensions.configuration.ini\\9.0.0\\microsoft.extensions.configuration.ini.9.0.0.nupkg.sha512", - "C:\\Users\\KennethTuisk\\.nuget\\packages\\microsoft.extensions.fileproviders.abstractions\\9.0.0\\microsoft.extensions.fileproviders.abstractions.9.0.0.nupkg.sha512", - "C:\\Users\\KennethTuisk\\.nuget\\packages\\microsoft.extensions.fileproviders.physical\\9.0.0\\microsoft.extensions.fileproviders.physical.9.0.0.nupkg.sha512", - "C:\\Users\\KennethTuisk\\.nuget\\packages\\microsoft.extensions.filesystemglobbing\\9.0.0\\microsoft.extensions.filesystemglobbing.9.0.0.nupkg.sha512", - "C:\\Users\\KennethTuisk\\.nuget\\packages\\microsoft.extensions.primitives\\9.0.0\\microsoft.extensions.primitives.9.0.0.nupkg.sha512" + "C:\\Users\\apple\\.nuget\\packages\\csvhelper\\33.0.1\\csvhelper.33.0.1.nupkg.sha512", + "C:\\Users\\apple\\.nuget\\packages\\microsoft.extensions.configuration\\9.0.0\\microsoft.extensions.configuration.9.0.0.nupkg.sha512", + "C:\\Users\\apple\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\9.0.0\\microsoft.extensions.configuration.abstractions.9.0.0.nupkg.sha512", + "C:\\Users\\apple\\.nuget\\packages\\microsoft.extensions.configuration.binder\\9.0.0\\microsoft.extensions.configuration.binder.9.0.0.nupkg.sha512", + "C:\\Users\\apple\\.nuget\\packages\\microsoft.extensions.configuration.environmentvariables\\9.0.0\\microsoft.extensions.configuration.environmentvariables.9.0.0.nupkg.sha512", + "C:\\Users\\apple\\.nuget\\packages\\microsoft.extensions.configuration.fileextensions\\9.0.0\\microsoft.extensions.configuration.fileextensions.9.0.0.nupkg.sha512", + "C:\\Users\\apple\\.nuget\\packages\\microsoft.extensions.configuration.ini\\9.0.0\\microsoft.extensions.configuration.ini.9.0.0.nupkg.sha512", + "C:\\Users\\apple\\.nuget\\packages\\microsoft.extensions.fileproviders.abstractions\\9.0.0\\microsoft.extensions.fileproviders.abstractions.9.0.0.nupkg.sha512", + "C:\\Users\\apple\\.nuget\\packages\\microsoft.extensions.fileproviders.physical\\9.0.0\\microsoft.extensions.fileproviders.physical.9.0.0.nupkg.sha512", + "C:\\Users\\apple\\.nuget\\packages\\microsoft.extensions.filesystemglobbing\\9.0.0\\microsoft.extensions.filesystemglobbing.9.0.0.nupkg.sha512", + "C:\\Users\\apple\\.nuget\\packages\\microsoft.extensions.primitives\\9.0.0\\microsoft.extensions.primitives.9.0.0.nupkg.sha512", + "C:\\Users\\apple\\.nuget\\packages\\newtonsoft.json\\13.0.3\\newtonsoft.json.13.0.3.nupkg.sha512" ], "logs": [] } \ No newline at end of file diff --git a/obj/project.packagespec.json b/obj/project.packagespec.json index 6b9b048..c4563c1 100644 --- a/obj/project.packagespec.json +++ b/obj/project.packagespec.json @@ -1 +1 @@ -"restore":{"projectUniqueName":"C:\\Users\\KennethTuisk\\RiderProjects\\RacingDSX\\RacingDSX.csproj","projectName":"RacingDSX","projectPath":"C:\\Users\\KennethTuisk\\RiderProjects\\RacingDSX\\RacingDSX.csproj","outputPath":"C:\\Users\\KennethTuisk\\RiderProjects\\RacingDSX\\obj\\","projectStyle":"PackageReference","UsingMicrosoftNETSdk":false,"fallbackFolders":["C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"],"originalTargetFrameworks":["net8.0-windows"],"sources":{"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\":{},"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0-windows7.0":{"targetAlias":"net8.0-windows","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]},"restoreAuditProperties":{"enableAudit":"true","auditLevel":"low","auditMode":"direct"}}"frameworks":{"net8.0-windows7.0":{"targetAlias":"net8.0-windows","dependencies":{"CsvHelper":{"target":"Package","version":"[33.0.1, )"},"Microsoft.Extensions.Configuration.Binder":{"target":"Package","version":"[9.0.0, )"},"Microsoft.Extensions.Configuration.EnvironmentVariables":{"target":"Package","version":"[9.0.0, )"},"Microsoft.Extensions.Configuration.Ini":{"target":"Package","version":"[9.0.0, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"},"Microsoft.WindowsDesktop.App.WindowsForms":{"privateAssets":"none"}},"runtimeIdentifierGraphPath":"C:\\Program Files\\dotnet\\sdk\\9.0.101/PortableRuntimeIdentifierGraph.json"}}"runtimes":{"win-x64":{"#import":[]}} \ No newline at end of file +"restore":{"projectUniqueName":"C:\\Users\\apple\\RiderProjects\\RacingDSX\\RacingDSX.csproj","projectName":"RacingDSX","projectPath":"C:\\Users\\apple\\RiderProjects\\RacingDSX\\RacingDSX.csproj","outputPath":"C:\\Users\\apple\\RiderProjects\\RacingDSX\\obj\\","projectStyle":"PackageReference","UsingMicrosoftNETSdk":false,"fallbackFolders":["C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"],"originalTargetFrameworks":["net8.0-windows"],"sources":{"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\":{},"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0-windows7.0":{"targetAlias":"net8.0-windows","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]},"restoreAuditProperties":{"enableAudit":"true","auditLevel":"low","auditMode":"all"}}"frameworks":{"net8.0-windows7.0":{"targetAlias":"net8.0-windows","dependencies":{"CsvHelper":{"target":"Package","version":"[33.0.1, )"},"Microsoft.Extensions.Configuration.Binder":{"target":"Package","version":"[9.0.0, )"},"Microsoft.Extensions.Configuration.EnvironmentVariables":{"target":"Package","version":"[9.0.0, )"},"Microsoft.Extensions.Configuration.Ini":{"target":"Package","version":"[9.0.0, )"},"Newtonsoft.Json":{"target":"Package","version":"[13.0.3, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"},"Microsoft.WindowsDesktop.App.WindowsForms":{"privateAssets":"none"}},"runtimeIdentifierGraphPath":"C:\\Program Files\\dotnet\\sdk\\9.0.100/PortableRuntimeIdentifierGraph.json"}}"runtimes":{"win-x64":{"#import":[]}} \ No newline at end of file diff --git a/obj/rider.project.restore.info b/obj/rider.project.restore.info index 42b270a..b1212c9 100644 --- a/obj/rider.project.restore.info +++ b/obj/rider.project.restore.info @@ -1 +1 @@ -17334029512667015 \ No newline at end of file +17335668337895570 \ No newline at end of file