diff --git a/net/.editorconfig b/net/.editorconfig index b71af5bf..30edcea2 100644 --- a/net/.editorconfig +++ b/net/.editorconfig @@ -502,6 +502,12 @@ csharp_style_unused_value_assignment_preference = discard_variable:none dotnet_diagnostic.IDE0059.severity = none dotnet_diagnostic.CA1416.severity = warning +# Disable some checks for generated code +[**/Substrate.Gear.Api/Api/**/*.cs] +dotnet_diagnostic.CS1570.severity = none +dotnet_diagnostic.CS1573.severity = none +dotnet_diagnostic.CS1587.severity = none + # Verify settings [*.{received,verified}.{json,txt,xml,cs}] charset = "utf-8-bom" diff --git a/net/src/Sails.ClientGenerator/Sails.ClientGenerator.csproj b/net/src/Sails.ClientGenerator/Sails.ClientGenerator.csproj index 92269963..93973cf2 100644 --- a/net/src/Sails.ClientGenerator/Sails.ClientGenerator.csproj +++ b/net/src/Sails.ClientGenerator/Sails.ClientGenerator.csproj @@ -10,9 +10,12 @@ true true Code generator for clients to communictae with Sails programs + true + true + snupkg README.md MIT OR Apache-2.0 - Sails, Vara, Gear, Substrate + Sails;Vara;Gear;Substrate net/v diff --git a/net/src/Sails.Net/Sails.Net.csproj b/net/src/Sails.Net/Sails.Net.csproj index 72bbc96b..0b1e5604 100644 --- a/net/src/Sails.Net/Sails.Net.csproj +++ b/net/src/Sails.Net/Sails.Net.csproj @@ -3,9 +3,13 @@ netstandard2.0 Low-level abstractions for communicating with Sails programs + true + true + snupkg + true README.md MIT OR Apache-2.0 - Sails, Vara, Gear, Substrate + Sails;Vara;Gear;Substrate net/v diff --git a/net/src/Substrate.Gear.Client/NetApi/Model/Types/Base/BaseDictionary.cs b/net/src/Substrate.Gear.Client/NetApi/Model/Types/Base/BaseDictionary.cs index 6b692652..e93a639e 100644 --- a/net/src/Substrate.Gear.Client/NetApi/Model/Types/Base/BaseDictionary.cs +++ b/net/src/Substrate.Gear.Client/NetApi/Model/Types/Base/BaseDictionary.cs @@ -12,13 +12,13 @@ public class BaseDictionary : IType where TValue : IType, new() { /// - /// Explicit conversion from Dictionary to BaseDictionary + /// Explicit conversion from to BaseDictionary /// /// public static explicit operator BaseDictionary(Dictionary p) => new(p); /// - /// Implicit conversion from BaseDictionary to Dictionary + /// Implicit conversion from BaseDictionary to /// /// public static implicit operator Dictionary(BaseDictionary p) => p.Value; @@ -68,7 +68,7 @@ public byte[] Encode() result.AddRange(kv.Key.Encode()); result.AddRange(kv.Value.Encode()); } - return result.ToArray(); + return [.. result]; } /// diff --git a/net/src/Substrate.Gear.Client/ReplyInfo.cs b/net/src/Substrate.Gear.Client/ReplyInfo.cs index 25f1e795..c4a0e8d0 100644 --- a/net/src/Substrate.Gear.Client/ReplyInfo.cs +++ b/net/src/Substrate.Gear.Client/ReplyInfo.cs @@ -10,10 +10,10 @@ public sealed record ReplyInfo public required byte[] EncodedPayload { get; init; } /// /// Value sent with the reply. - /// /// + /// public required ValueUnit Value { get; init; } /// /// Reply code of the reply. - /// + /// public required EnumReplyCode Code { get; init; } }