From a1ce29f49eba73bd9298e68714416de6633db7b7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 31 Mar 2026 23:04:22 +0000 Subject: [PATCH 1/3] Initial plan From f633cf5580df286b5c1d813afcea34e71561fe87 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 31 Mar 2026 23:20:38 +0000 Subject: [PATCH 2/3] Update to .NET 10 and latest NuGet packages; fix API breaking changes Agent-Logs-Url: https://github.com/Coflnet/cloud/sessions/266b0d33-667d-4b75-af0a-64ad97b173e4 Co-authored-by: Ekwav <16632490+Ekwav@users.noreply.github.com> --- Client/Client.csproj | 7 ++++--- Client/ClientExtentions/Messaging/Chat.cs | 4 ++++ Client/ClientExtentions/Messaging/ChatService.cs | 2 +- Core/Core.csproj | 13 +++++++------ Core/CoreTests/SerializationTests.cs | 2 +- Core/Extentions/KeyValue/KeyValueStore.cs | 6 +++--- .../KeyValue/KeyValueTests/KeyValueTests.csproj | 10 +++++----- Core/Scripts/CommandController.cs | 7 ++++--- Core/Scripts/Services/TrackService.cs | 9 +++------ Server/Core/DataBaseAdapter.cs | 6 +++--- Server/Server.csproj | 9 +++++---- dev/dev.csproj | 9 ++++----- 12 files changed, 44 insertions(+), 40 deletions(-) diff --git a/Client/Client.csproj b/Client/Client.csproj index 9041c3f..d83dab7 100644 --- a/Client/Client.csproj +++ b/Client/Client.csproj @@ -4,15 +4,16 @@ - netstandard2.0 + net10.0 false false + MsgPack003;MsgPack004;MsgPack005;MsgPack007;MsgPack011;CS8785 - + - + diff --git a/Client/ClientExtentions/Messaging/Chat.cs b/Client/ClientExtentions/Messaging/Chat.cs index 4b73e63..c1c11f1 100644 --- a/Client/ClientExtentions/Messaging/Chat.cs +++ b/Client/ClientExtentions/Messaging/Chat.cs @@ -183,6 +183,10 @@ public Params(List members, string name) this.Members = members; this.Name = name; } + + public Params() + { + } } } diff --git a/Client/ClientExtentions/Messaging/ChatService.cs b/Client/ClientExtentions/Messaging/ChatService.cs index 3e3a41e..39fdf75 100644 --- a/Client/ClientExtentions/Messaging/ChatService.cs +++ b/Client/ClientExtentions/Messaging/ChatService.cs @@ -369,7 +369,7 @@ private string FileName(EntityId chatId,long messageIndex) /// Local chat message contains additional iformation like received and watched noticements /// [MessagePackObject] - public class LocalChatMessage : ChatMessage + public partial class LocalChatMessage : ChatMessage { public enum Status { diff --git a/Core/Core.csproj b/Core/Core.csproj index b3d4df9..e6405b3 100644 --- a/Core/Core.csproj +++ b/Core/Core.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + net10.0 false false false @@ -11,15 +11,16 @@ false false false + MsgPack003;MsgPack004;MsgPack005;MsgPack007;MsgPack011;CS8785 - + - - - - + + + + diff --git a/Core/CoreTests/SerializationTests.cs b/Core/CoreTests/SerializationTests.cs index f2887b5..119892e 100644 --- a/Core/CoreTests/SerializationTests.cs +++ b/Core/CoreTests/SerializationTests.cs @@ -109,7 +109,7 @@ public void SourceReferenceRegion () { public void MultipleObjectWriteTest () { FileController.WriteLinesAs ("ok", TestInts ()); var read = FileController.ReadLinesAs ("ok"); - CollectionAssert.AreEqual(TestInts(),read); + Assert.That(read, Is.EqualTo(TestInts())); } private IEnumerable TestInts () { diff --git a/Core/Extentions/KeyValue/KeyValueStore.cs b/Core/Extentions/KeyValue/KeyValueStore.cs index c0e803d..eab068a 100644 --- a/Core/Extentions/KeyValue/KeyValueStore.cs +++ b/Core/Extentions/KeyValue/KeyValueStore.cs @@ -1,5 +1,5 @@ using Coflnet; -using RangeTree; +using IntervalTree; namespace Core.Extentions.KeyValue { @@ -9,11 +9,11 @@ namespace Core.Extentions.KeyValue /// public class KeyValueStore : Entity { - public RangeTree Buckets {get;set;} + public IntervalTree Buckets {get;set;} public KeyValueStore() { - Buckets = new RangeTree(); + Buckets = new IntervalTree(); } diff --git a/Core/Extentions/KeyValue/KeyValueTests/KeyValueTests.csproj b/Core/Extentions/KeyValue/KeyValueTests/KeyValueTests.csproj index be36ff3..30d4a57 100644 --- a/Core/Extentions/KeyValue/KeyValueTests/KeyValueTests.csproj +++ b/Core/Extentions/KeyValue/KeyValueTests/KeyValueTests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net10.0 false @@ -9,10 +9,10 @@ - - - - + + + + diff --git a/Core/Scripts/CommandController.cs b/Core/Scripts/CommandController.cs index cab92de..2e88b5d 100644 --- a/Core/Scripts/CommandController.cs +++ b/Core/Scripts/CommandController.cs @@ -4,6 +4,7 @@ using Coflnet; using Coflnet.Server; using MessagePack; +using RestSharp; namespace Coflnet { @@ -275,7 +276,7 @@ public override ServerCommand.ServerCommandSettings GetServerSettings () { /// Represents a command that invokes a external rest api /// public class RestCommand : ServerCommand { - RestSharp.RestClient client = new RestSharp.RestClient (); + RestSharp.RestClient client; RestCommandRegisterRequest registerRequest; public override void Execute (CommandData data) { @@ -284,7 +285,7 @@ public override void Execute (CommandData data) { foreach (var item in registerRequest.defaultHeaders) { request.AddHeader (item.Key, item.Value); } - var remoteResponse = client.Execute (request); + var remoteResponse = client.ExecuteAsync (request).GetAwaiter().GetResult(); //CommandData response = new CommandData(); //response.m = remoteResponse.RawBytes; @@ -310,7 +311,7 @@ public override ServerCommandSettings GetServerSettings () { public RestCommand (RestCommandRegisterRequest request) { registerRequest = request; - client.BaseHost = request.BaseUrl; + client = new RestSharp.RestClient (request.BaseUrl); } } diff --git a/Core/Scripts/Services/TrackService.cs b/Core/Scripts/Services/TrackService.cs index 6894003..43222e0 100644 --- a/Core/Scripts/Services/TrackService.cs +++ b/Core/Scripts/Services/TrackService.cs @@ -31,7 +31,7 @@ public void SendTrackingRequest(string title, bool sendSinceStartup = false) { var client = new RestClient(ConfigController.GetUrl("track")); - var request = new RestRequest("resource/{id}", Method.GET); + var request = new RestRequest("resource/{id}", Method.Get); request.AddParameter("url", title); // adds to POST or URL querystring based on Method request.AddParameter("title", title); request.AddParameter("action_name", title); @@ -44,11 +44,8 @@ public void SendTrackingRequest(string title, bool sendSinceStartup = false) - // send of - client.ExecuteAsync(request, response => - { - // done - }); + // send off + _ = client.ExecuteAsync(request); if (sendSinceStartup) url += GetStartTimeParameter(); diff --git a/Server/Core/DataBaseAdapter.cs b/Server/Core/DataBaseAdapter.cs index 3ac49b5..383ea88 100644 --- a/Server/Core/DataBaseAdapter.cs +++ b/Server/Core/DataBaseAdapter.cs @@ -20,7 +20,7 @@ public class DBList where T : IDatabaseable public T Get(string id) { - RestRequest request = new RestRequest(sprunjeEndpoint, RestSharp.Method.GET); + RestRequest request = new RestRequest(sprunjeEndpoint, RestSharp.Method.Get); request.AddHeader("Authorization", "blabla"); var client = new RestClient("http://example.com"); @@ -30,7 +30,7 @@ public T Get(string id) public T GetT(DateTime start, DateTime end) { - RestRequest request = new RestRequest(sprunjeEndpoint, RestSharp.Method.GET); + RestRequest request = new RestRequest(sprunjeEndpoint, RestSharp.Method.Get); request.AddHeader("Authorization", "blabla"); var client = new RestClient("http://example.com"); @@ -61,7 +61,7 @@ public CommandData Get(long id) } // wasn't found, search the DB over the rest API next - RestRequest request = new RestRequest(RestSharp.Method.GET); + RestRequest request = new RestRequest(); request.AddHeader("Authorization", user.AuthToken); request.AddHeader("messageId", id.ToString()); var result = messageEndpoint.Execute(request); diff --git a/Server/Server.csproj b/Server/Server.csproj index 20d7639..44f2e4e 100644 --- a/Server/Server.csproj +++ b/Server/Server.csproj @@ -5,16 +5,17 @@ - netstandard2.0 + net10.0 false false + MsgPack003;MsgPack004;MsgPack005;MsgPack007;MsgPack011;CS8785 - + - - + + diff --git a/dev/dev.csproj b/dev/dev.csproj index 1595bae..2e9fa2c 100644 --- a/dev/dev.csproj +++ b/dev/dev.csproj @@ -7,16 +7,15 @@ - - + + - Exe - false - netcoreapp2.2 false + net10.0 false + MsgPack003;MsgPack004;MsgPack005;MsgPack007;MsgPack011;CS8785 From ec9cfc0d53b8d60687b4dad72dec090077768a20 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 31 Mar 2026 23:23:53 +0000 Subject: [PATCH 3/3] Use sync RestSharp Execute extension method instead of GetAwaiter().GetResult() Agent-Logs-Url: https://github.com/Coflnet/cloud/sessions/266b0d33-667d-4b75-af0a-64ad97b173e4 Co-authored-by: Ekwav <16632490+Ekwav@users.noreply.github.com> --- Core/Scripts/CommandController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/Scripts/CommandController.cs b/Core/Scripts/CommandController.cs index 2e88b5d..a4cd0b4 100644 --- a/Core/Scripts/CommandController.cs +++ b/Core/Scripts/CommandController.cs @@ -285,7 +285,7 @@ public override void Execute (CommandData data) { foreach (var item in registerRequest.defaultHeaders) { request.AddHeader (item.Key, item.Value); } - var remoteResponse = client.ExecuteAsync (request).GetAwaiter().GetResult(); + var remoteResponse = client.Execute (request); //CommandData response = new CommandData(); //response.m = remoteResponse.RawBytes;