Skip to content

Commit 3f4b138

Browse files
committed
Built && Tested
1 parent 27678c5 commit 3f4b138

17 files changed

+24
-42
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dotnet_style_prefer_inferred_tuple_names = true:suggestion
2121
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
2222
dotnet_style_prefer_simplified_interpolation = true:suggestion
2323
dotnet_style_prefer_compound_assignment = true:suggestion
24-
dotnet_style_namespace_match_folder = true:suggestion
24+
dotnet_style_namespace_match_folder = false:suggestion
2525
dotnet_style_readonly_field = true:warning
2626
dotnet_style_predefined_type_for_locals_parameters_members = true:error
2727
dotnet_style_predefined_type_for_member_access = true:error

InterlockLedger.Rest.Client/Abstractions/RestNetwork.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
namespace InterlockLedger.Rest.Client.Abstractions;
3434

35-
public class RestNetwork<T> where T: IRestChain
35+
public class RestNetwork<T> where T : IRestChain
3636
{
3737
public Task<AppsModel?> GetAppsAsync() => _node.GetAsync<AppsModel>("/apps");
3838

InterlockLedger.Rest.Client/Implementations/InterlockingsImplementation.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
namespace InterlockLedger.Rest.Client.Abstractions;
3434

35-
internal sealed class InterlockingsImplementation<T> : IInterlockings where T: IRestChain
35+
internal sealed class InterlockingsImplementation<T> : IInterlockings where T : IRestChain
3636
{
3737
public InterlockingsImplementation(RestAbstractChain<T> parent) {
3838
_parent = parent.Required();

InterlockLedger.Rest.Client/Implementations/RecordsStoreImplementation.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
namespace InterlockLedger.Rest.Client.Abstractions;
3434

35-
internal sealed class RecordsStoreImplementation<T> : IRecordsStore where T: IRestChain
35+
internal sealed class RecordsStoreImplementation<T> : IRecordsStore where T : IRestChain
3636
{
3737
public RecordsStoreImplementation(RestAbstractChain<T> parent) {
3838
_parent = parent.Required();

InterlockLedger.Rest.Client/InterlockLedger.Rest.Client.csproj

+2-11
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>net8.0</TargetFrameworks>
5-
<Version>14.2.2</Version>
5+
<LangVersion>preview</LangVersion>
6+
<Version>15.0.0</Version>
67
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
78
<Copyright>Copyright (c) 2018-2024 InterlockLedger Network</Copyright>
89
<Description>
@@ -35,17 +36,7 @@
3536
<Using Include="System.Web" />
3637
</ItemGroup>
3738
<ItemGroup>
38-
<PackageReference Include="InterlockLedger.Commons" Version="18.2.1" />
3939
<PackageReference Include="InterlockLedger.Tags.ILInt" Version="14.0.0" />
40-
<PackageReference Include="Meziantou.Analyzer" Version="2.0.158">
41-
<PrivateAssets>all</PrivateAssets>
42-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
43-
</PackageReference>
44-
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4">
45-
<PrivateAssets>all</PrivateAssets>
46-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
47-
</PackageReference>
48-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0" />
4940
</ItemGroup>
5041

5142
<ItemGroup>

InterlockLedger.Rest.Client/Models/ChainCreationModel.cs

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ public class ChainCreationModel
4040
/// <summary>
4141
/// List of additional apps (only the numeric ids)
4242
/// </summary>
43-
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "MA0016:Prefer using collection abstraction instead of implementation", Justification = "<Pending>")]
4443
public List<ulong> AdditionalApps { get; set; } = [];
4544

4645
/// <summary>

InterlockLedger.Rest.Client/Models/ChainIdModel.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public class ChainIdModel : IComparable<ChainIdModel>, IEquatable<ChainIdModel>
7878
/// This instance follows <paramref name="other">other</paramref> in the sort order.
7979
/// </para>
8080
/// </returns>
81-
public int CompareTo(ChainIdModel? other) => Id is null ? -1 : Id.CompareTo(other?.Id) ;
81+
public int CompareTo(ChainIdModel? other) => Id is null ? -1 : Id.CompareTo(other?.Id);
8282

8383
/// <summary>
8484
/// Compares this ChainIdModel to other object
@@ -96,7 +96,7 @@ public class ChainIdModel : IComparable<ChainIdModel>, IEquatable<ChainIdModel>
9696

9797
/// <summary>Calculate the hash</summary>
9898
/// <returns>A hash code for the current instance</returns>
99-
public override int GetHashCode() =>HashCode.Combine(Id);
99+
public override int GetHashCode() => HashCode.Combine(Id);
100100

101101
public override string ToString() => $"Chain '{Name}' #{Id}";
102102
}

InterlockLedger.Rest.Client/Models/ChainSummaryModel.cs

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public sealed partial class ChainSummaryModel : ChainIdModel
3737
/// <summary>
3838
/// List of active apps (only the numeric ids)
3939
/// </summary>
40-
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "MA0016:Prefer using collection abstraction instead of implementation", Justification = "<Pending>")]
4140
public List<ulong> ActiveApps { get; set; } = [];
4241

4342
/// <summary>

InterlockLedger.Rest.Client/Models/KeyPermitBaseModel.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ public abstract class KeyPermitBaseModel
5252
public required KeyPurpose[] Purposes { get; set; }
5353

5454
[SetsRequiredMembers]
55-
protected KeyPermitBaseModel(IEnumerable<AppPermissions> permissions, KeyPurpose[] purposes, string? name = null)
56-
{
55+
protected KeyPermitBaseModel(IEnumerable<AppPermissions> permissions, KeyPurpose[] purposes, string? name = null) {
5756
if (permissions.None())
5857
throw new InvalidDataException("This key doesn't have at least one action to be permitted");
5958
Permissions = permissions.Required();

InterlockLedger.Rest.Client/Models/NodeDetailsModel.cs

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ public class NodeDetailsModel : NodeCommonModel
4545
/// <summary>
4646
/// Other properties the node may have
4747
/// </summary>
48-
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "MA0016:Prefer using collection abstraction instead of implementation", Justification = "<Pending>")]
4948
public Dictionary<string, string> Extensions { get; set; } = [];
5049

5150
private static string ToLine(KeyValuePair<string, string> x) => $"{x.Key}: {x.Value}";

InterlockLedger.Rest.Client/Models/Types/PublishedApp.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ public partial class PublishedApp : IComparable<PublishedApp>, IEquatable<Publis
6262

6363
public static bool operator >=(PublishedApp left, PublishedApp right) => left is null ? right is null : left.CompareTo(right) >= 0;
6464

65-
public int CompareTo(PublishedApp? other)
66-
{
65+
public int CompareTo(PublishedApp? other) {
6766
if (other is null) return 1;
6867
var idCompare = Id.CompareTo(other.Id);
6968
return idCompare != 0 ? idCompare : AppVersion?.CompareTo(other.AppVersion) ?? -1;

InterlockLedger.Rest.Client/V14_2_2/Implementations/DocumentRegistryImplementation.cs

+1-3
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232

3333

3434
using System.Globalization;
35-
using System.Linq;
36-
using Microsoft.CodeAnalysis;
3735

3836
namespace InterlockLedger.Rest.Client.V14_2_2;
3937

@@ -86,7 +84,7 @@ internal class DocumentRegistryImplementation<ChainType>(RestAbstractNode<ChainT
8684
public static string UrlFromParts(string urlPrefix, string id, string? selector = null, Dictionary<string, string>? queryItems = null) {
8785
var urlBuilder = new StringBuilder(urlPrefix).Append('/')
8886
.Append(HttpUtility.UrlEncode(id.Required()));
89-
if (selector.IsNonBlank())
87+
if (!string.IsNullOrWhiteSpace(selector))
9088
urlBuilder.Append('/')
9189
.Append(HttpUtility.UrlEncode(selector));
9290
if (queryItems.SafeAny()) {

InterlockLedger.Rest.Client/V14_2_2/Implementations/JsonStoreImplementation.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
namespace InterlockLedger.Rest.Client.V14_2_2;
3434

35-
internal sealed class JsonStoreImplementation : IJsonStore
35+
internal sealed class JsonStoreImplementation : IJsonStore
3636
{
3737
public JsonStoreImplementation(RestChainV14_2_2 parent) {
3838
_parent = parent.Required();

InterlockLedger.Rest.Client/V14_2_2/Interfaces/IJsonStore.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
namespace InterlockLedger.Rest.Client.V14_2_2;
3434

35-
public interface IJsonStore
35+
public interface IJsonStore
3636
{
3737
Task<JsonDocumentModel?> RetrieveAsync(ulong serial);
3838

InterlockLedger.Rest.Client/V14_2_2/Models/PageOfAllowedReadersRecordModel.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ******************************************************************************************************************************
1+
// ******************************************************************************************************************************
22
//
33
// Copyright (c) 2018-2022 InterlockLedger Network
44
// All rights reserved.
@@ -30,8 +30,11 @@
3030
//
3131
// ******************************************************************************************************************************
3232

33+
3334
namespace InterlockLedger.Rest.Client.V14_2_2;
3435

35-
public class PageOfAllowedReadersRecordModel : PageOf<AllowedReadersRecordModel>
36+
public record PageOfAllowedReadersRecordModel : PageOf<AllowedReadersRecordModel>
3637
{
38+
public PageOfAllowedReadersRecordModel(IEnumerable<AllowedReadersRecordModel> Items, ushort Page, byte PageSize, ushort TotalNumberOfPages, bool LastToFirst) : base(Items, Page, PageSize, TotalNumberOfPages, LastToFirst) {
39+
}
3740
}

InterlockLedger.Rest.Client/V14_2_2/Models/PageOfOpaqueRecordsModel.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ******************************************************************************************************************************
1+
// ******************************************************************************************************************************
22
//
33
// Copyright (c) 2018-2022 InterlockLedger Network
44
// All rights reserved.
@@ -31,9 +31,13 @@
3131
// ******************************************************************************************************************************
3232

3333

34+
3435
namespace InterlockLedger.Rest.Client.V14_2_2;
3536

36-
public class PageOfOpaqueRecordsModel : PageOf<OpaqueRecordModel>
37+
public record PageOfOpaqueRecordsModel : PageOf<OpaqueRecordModel>
3738
{
39+
public PageOfOpaqueRecordsModel(IEnumerable<OpaqueRecordModel> Items, ushort Page, byte PageSize, ushort TotalNumberOfPages, bool LastToFirst, ulong LastChangedRecordSerial) : base(Items, Page, PageSize, TotalNumberOfPages, LastToFirst) =>
40+
this.LastChangedRecordSerial = LastChangedRecordSerial;
41+
3842
public ulong LastChangedRecordSerial { get; set; }
3943
}

rest_client/rest_client.csproj

-9
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,6 @@
2424

2525
<ItemGroup>
2626
<PackageReference Include="Cocona.Lite" Version="2.2.0" />
27-
<PackageReference Include="Meziantou.Analyzer" Version="2.0.158">
28-
<PrivateAssets>all</PrivateAssets>
29-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
30-
</PackageReference>
31-
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4">
32-
<PrivateAssets>all</PrivateAssets>
33-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
34-
</PackageReference>
35-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0" />
3627
</ItemGroup>
3728

3829
<ItemGroup>

0 commit comments

Comments
 (0)