Skip to content

Commit 2887799

Browse files
committed
Add required Id property to ReadOnly classes for consistency
1 parent 573ec33 commit 2887799

File tree

7 files changed

+30
-7
lines changed

7 files changed

+30
-7
lines changed

src/Nomad/ReadOnlyAccentColor.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ namespace WindowsAppCommunity.Sdk.Nomad;
77
/// <inheritdoc cref="IReadOnlyAccentColor" />
88
public class ReadOnlyAccentColor : IReadOnlyAccentColor, IDelegable<IAccentColor>
99
{
10+
/// <inheritdoc />
11+
public required string Id { get; init; }
12+
1013
/// <summary>
1114
/// The client to use for communicating with ipfs.
1215
/// </summary>

src/Nomad/ReadOnlyConnectionCollection.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ namespace WindowsAppCommunity.Sdk.Nomad;
1212
/// </summary>
1313
public class ReadOnlyConnectionCollection : IReadOnlyConnectionsCollection, IDelegable<IConnections>, IReadOnlyNomadKuboRegistry<IReadOnlyConnection>
1414
{
15+
/// <inheritdoc />
16+
public required string Id { get; init; }
17+
1518
/// <summary>
1619
/// The client to use for communicating with ipfs.
1720
/// </summary>

src/Nomad/ReadOnlyImagesCollection.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ namespace WindowsAppCommunity.Sdk.Nomad;
1212
/// <inheritdoc cref="IReadOnlyImagesCollection" />
1313
public class ReadOnlyImagesCollection : IReadOnlyImagesCollection, IDelegable<IImages>, IReadOnlyNomadKuboRegistry<IFile>
1414
{
15+
/// <inheritdoc />
16+
public required string Id { get; init; }
17+
1518
/// <summary>
1619
/// The client to use for communicating with ipfs.
1720
/// </summary>

src/Nomad/ReadOnlyLinksCollection.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ namespace WindowsAppCommunity.Sdk.Nomad;
1111
/// <inheritdoc cref="IReadOnlyLinksCollection" />
1212
public class ReadOnlyLinksCollection : IReadOnlyLinksCollection, IDelegable<ILinkCollection>, IReadOnlyNomadKuboRegistry<Link>
1313
{
14+
/// <inheritdoc />
15+
public required string Id { get; init; }
16+
1417
/// <summary>
1518
/// The client to use for communicating with ipfs.
1619
/// </summary>

src/Nomad/ReadOnlyProject.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,21 @@ public static ReadOnlyProject FromHandlerConfig(NomadKuboEventStreamHandlerConfi
3030

3131
ReadOnlyImagesCollection readOnlyImagesCollection = new ReadOnlyImagesCollection
3232
{
33+
Id = handlerConfig.RoamingId,
3334
Inner = handlerConfig.RoamingValue,
3435
Client = client,
3536
};
3637

3738
ReadOnlyConnectionCollection readOnlyConnectionCollection = new ReadOnlyConnectionCollection
3839
{
40+
Id = handlerConfig.RoamingId,
3941
Inner = handlerConfig.RoamingValue,
4042
Client = client,
4143
};
4244

4345
ReadOnlyLinksCollection readOnlyLinksCollection = new ReadOnlyLinksCollection
4446
{
47+
Id = handlerConfig.RoamingId,
4548
Inner = handlerConfig.RoamingValue,
4649
Client = client,
4750
};
@@ -58,6 +61,7 @@ public static ReadOnlyProject FromHandlerConfig(NomadKuboEventStreamHandlerConfi
5861

5962
ReadOnlyAccentColor readOnlyAccentColor = new ReadOnlyAccentColor
6063
{
64+
Id = handlerConfig.RoamingId,
6165
Inner = handlerConfig.RoamingValue,
6266
Client = client,
6367
};

src/Nomad/ReadOnlyPublisher.cs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,21 @@ public static ReadOnlyPublisher FromHandlerConfig(NomadKuboEventStreamHandlerCon
3030

3131
ReadOnlyImagesCollection readOnlyImagesCollection = new ReadOnlyImagesCollection
3232
{
33+
Id = handlerConfig.RoamingId,
3334
Inner = handlerConfig.RoamingValue,
3435
Client = client,
3536
};
3637

3738
ReadOnlyConnectionCollection readOnlyConnectionCollection = new ReadOnlyConnectionCollection
3839
{
40+
Id = handlerConfig.RoamingId,
3941
Inner = handlerConfig.RoamingValue,
4042
Client = client,
4143
};
4244

4345
ReadOnlyLinksCollection readOnlyLinksCollection = new ReadOnlyLinksCollection
4446
{
47+
Id = handlerConfig.RoamingId,
4548
Inner = handlerConfig.RoamingValue,
4649
Client = client,
4750
};
@@ -57,16 +60,9 @@ public static ReadOnlyPublisher FromHandlerConfig(NomadKuboEventStreamHandlerCon
5760
};
5861

5962
ReadOnlyAccentColor readOnlyAccentColor = new ReadOnlyAccentColor
60-
{
61-
Inner = handlerConfig.RoamingValue,
62-
Client = client,
63-
};
64-
65-
ReadOnlyUserRoleCollection readOnlyUserRoleCollection = new()
6663
{
6764
Id = handlerConfig.RoamingId,
6865
Inner = handlerConfig.RoamingValue,
69-
UserRepository = userRepository,
7066
Client = client,
7167
};
7268

@@ -95,6 +91,14 @@ public static ReadOnlyPublisher FromHandlerConfig(NomadKuboEventStreamHandlerCon
9591
ProjectDependencyRepository = projectDependencyRepository,
9692
};
9793

94+
ReadOnlyUserRoleCollection readOnlyUserRoleCollection = new ReadOnlyUserRoleCollection
95+
{
96+
Id = handlerConfig.RoamingId,
97+
Inner = handlerConfig.RoamingValue,
98+
Client = client,
99+
UserRepository = userRepository,
100+
};
101+
98102
return new ReadOnlyPublisher
99103
{
100104
Id = handlerConfig.RoamingId,

src/Nomad/ReadOnlyUser.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,21 @@ public static ReadOnlyUser FromHandlerConfig(NomadKuboEventStreamHandlerConfig<U
2828

2929
ReadOnlyImagesCollection readOnlyImagesCollection = new ReadOnlyImagesCollection
3030
{
31+
Id = handlerConfig.RoamingId,
3132
Inner = handlerConfig.RoamingValue,
3233
Client = client,
3334
};
3435

3536
ReadOnlyConnectionCollection readOnlyConnectionCollection = new ReadOnlyConnectionCollection
3637
{
38+
Id = handlerConfig.RoamingId,
3739
Inner = handlerConfig.RoamingValue,
3840
Client = client,
3941
};
4042

4143
ReadOnlyLinksCollection readOnlyLinksCollection = new ReadOnlyLinksCollection
4244
{
45+
Id = handlerConfig.RoamingId,
4346
Inner = handlerConfig.RoamingValue,
4447
Client = client,
4548
};

0 commit comments

Comments
 (0)