-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathModifiablePublisherRole.cs
More file actions
161 lines (111 loc) · 6.71 KB
/
ModifiablePublisherRole.cs
File metadata and controls
161 lines (111 loc) · 6.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
using System.Collections.Generic;
using OwlCore.Storage;
namespace WindowsAppCommunity.Sdk.Nomad;
/// <summary>
/// Represents a publisher and role that can be modified.
/// </summary>
public class ModifiablePublisherRole : IModifiablePublisherRole
{
/// <summary>
/// The modifiable publisher this role is for.
/// </summary>
public required ModifiablePublisher InnerPublisher { get; init; }
/// <summary>
/// The role this publisher has.
/// </summary>
public required Role Role { get; init; }
/// <inheritdoc/>
public string Name => InnerPublisher.Name;
/// <inheritdoc/>
public string Description => InnerPublisher.Description;
/// <inheritdoc/>
public string ExtendedDescription => InnerPublisher.ExtendedDescription;
/// <inheritdoc/>
public bool? ForgetMe => InnerPublisher.ForgetMe;
/// <inheritdoc/>
public bool IsUnlisted => InnerPublisher.IsUnlisted;
/// <inheritdoc/>
public Link[] Links => InnerPublisher.Links;
/// <inheritdoc/>
public string Id => InnerPublisher.Id;
/// <inheritdoc/>
public string? AccentColor => InnerPublisher.AccentColor;
/// <inheritdoc/>
public IModifiablePublisherCollection<IReadOnlyPublisherRole> ParentPublishers => InnerPublisher.ParentPublishers;
/// <inheritdoc/>
public IModifiablePublisherCollection<IReadOnlyPublisherRole> ChildPublishers => InnerPublisher.ChildPublishers;
/// <inheritdoc/>
IReadOnlyPublisherRoleCollection IReadOnlyPublisher<IReadOnlyPublisherRoleCollection>.ParentPublishers => (IReadOnlyPublisherRoleCollection)InnerPublisher.ParentPublishers;
/// <inheritdoc/>
IReadOnlyPublisherRoleCollection IReadOnlyPublisher<IReadOnlyPublisherRoleCollection>.ChildPublishers => (IReadOnlyPublisherRoleCollection)InnerPublisher.ChildPublishers;
/// <inheritdoc/>
public event EventHandler<string>? NameUpdated;
/// <inheritdoc/>
public event EventHandler<string>? DescriptionUpdated;
/// <inheritdoc/>
public event EventHandler<string>? ExtendedDescriptionUpdated;
/// <inheritdoc/>
public event EventHandler<bool?>? ForgetMeUpdated;
/// <inheritdoc/>
public event EventHandler<bool>? IsUnlistedUpdated;
/// <inheritdoc/>
public event EventHandler<IReadOnlyConnection[]>? ConnectionsAdded;
/// <inheritdoc/>
public event EventHandler<IReadOnlyConnection[]>? ConnectionsRemoved;
/// <inheritdoc/>
public event EventHandler<Link[]>? LinksAdded;
/// <inheritdoc/>
public event EventHandler<Link[]>? LinksRemoved;
/// <inheritdoc/>
public event EventHandler<IFile[]>? ImagesAdded;
/// <inheritdoc/>
public event EventHandler<IFile[]>? ImagesRemoved;
/// <inheritdoc/>
public event EventHandler<string?>? AccentColorUpdated;
/// <inheritdoc/>
public event EventHandler<IReadOnlyProject[]>? ProjectsAdded;
/// <inheritdoc/>
public event EventHandler<IReadOnlyProject[]>? ProjectsRemoved;
/// <inheritdoc />
public IAsyncEnumerable<IReadOnlyConnection> GetConnectionsAsync(CancellationToken cancellationToken = default) => InnerPublisher.GetConnectionsAsync(cancellationToken);
/// <inheritdoc/>
public Task AddConnectionAsync(IReadOnlyConnection connection, CancellationToken cancellationToken) => InnerPublisher.AddConnectionAsync(connection, cancellationToken);
/// <inheritdoc/>
public Task AddImageAsync(IFile imageFile, CancellationToken cancellationToken) => InnerPublisher.AddImageAsync(imageFile, cancellationToken);
/// <inheritdoc/>
public Task AddImageAsync(IFile imageFile, string? id, string? name, CancellationToken cancellationToken) => InnerPublisher.AddImageAsync(imageFile, id, name, cancellationToken);
/// <inheritdoc/>
public Task AddLinkAsync(Link link, CancellationToken cancellationToken) => InnerPublisher.AddLinkAsync(link, cancellationToken);
/// <inheritdoc/>
public Task AddProjectAsync(IReadOnlyProject project, CancellationToken cancellationToken) => InnerPublisher.AddProjectAsync(project, cancellationToken);
/// <inheritdoc/>
public Task AddUserAsync(IReadOnlyUserRole user, CancellationToken cancellationToken) => InnerPublisher.AddUserAsync(user, cancellationToken);
/// <inheritdoc/>
public IAsyncEnumerable<IFile> GetImageFilesAsync(CancellationToken cancellationToken) => InnerPublisher.GetImageFilesAsync(cancellationToken);
/// <inheritdoc/>
public IAsyncEnumerable<IReadOnlyProject> GetProjectsAsync(CancellationToken cancellationToken) => InnerPublisher.GetProjectsAsync(cancellationToken);
/// <inheritdoc/>
public IAsyncEnumerable<IReadOnlyUserRole> GetUsersAsync(CancellationToken cancellationToken) => InnerPublisher.GetUsersAsync(cancellationToken);
/// <inheritdoc/>
public Task RemoveConnectionAsync(IReadOnlyConnection connection, CancellationToken cancellationToken) => InnerPublisher.RemoveConnectionAsync(connection, cancellationToken);
/// <inheritdoc/>
public Task RemoveImageAsync(string imageId, CancellationToken cancellationToken) => InnerPublisher.RemoveImageAsync(imageId, cancellationToken);
/// <inheritdoc/>
public Task RemoveLinkAsync(Link link, CancellationToken cancellationToken) => InnerPublisher.RemoveLinkAsync(link, cancellationToken);
/// <inheritdoc/>
public Task RemoveProjectAsync(IReadOnlyProject project, CancellationToken cancellationToken) => InnerPublisher.RemoveProjectAsync(project, cancellationToken);
/// <inheritdoc/>
public Task RemoveUserAsync(IReadOnlyUserRole user, CancellationToken cancellationToken) => InnerPublisher.RemoveUserAsync(user, cancellationToken);
/// <inheritdoc/>
public Task UpdateAccentColorAsync(string? accentColor, CancellationToken cancellationToken) => InnerPublisher.UpdateAccentColorAsync(accentColor, cancellationToken);
/// <inheritdoc/>
public Task UpdateDescriptionAsync(string description, CancellationToken cancellationToken) => InnerPublisher.UpdateDescriptionAsync(description, cancellationToken);
/// <inheritdoc/>
public Task UpdateExtendedDescriptionAsync(string extendedDescription, CancellationToken cancellationToken) => InnerPublisher.UpdateExtendedDescriptionAsync(extendedDescription, cancellationToken);
/// <inheritdoc/>
public Task UpdateForgetMeStatusAsync(bool? forgetMe, CancellationToken cancellationToken) => InnerPublisher.UpdateForgetMeStatusAsync(forgetMe, cancellationToken);
/// <inheritdoc/>
public Task UpdateNameAsync(string name, CancellationToken cancellationToken) => InnerPublisher.UpdateNameAsync(name, cancellationToken);
/// <inheritdoc/>
public Task UpdateUnlistedStateAsync(bool isUnlisted, CancellationToken cancellationToken) => InnerPublisher.UpdateUnlistedStateAsync(isUnlisted, cancellationToken);
}