tgstation-server 6.19.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
UpdatedUser.cs
Go to the documentation of this file.
1using System;
2
5
7{
11 public sealed class UpdatedUser :
12 ILegacyApiTransformable<UserResponse>,
13 IApiTransformable<UpdatedUser, GraphQL.Types.UpdatedUser, UpdatedUserGraphQLTransformer>
14 {
18 public long Id { get; }
19
23 public User? User { get; }
24
29 public UpdatedUser(User user)
30 : this((user ?? throw new ArgumentNullException(nameof(user))).Require(u => u.Id))
31 {
32 User = user;
33 }
34
39 public UpdatedUser(long id)
40 {
41 Id = id;
42 }
43
46 => User?.ToApi() ?? new UserResponse
47 {
48 Id = Id,
49 };
50 }
51}
Represents a User that has been updated.
UpdatedUser(User user)
Initializes a new instance of the UpdatedUser class.
long Id
The User's Api.Models.EntityId.Id.
UpdatedUser(long id)
Initializes a new instance of the UpdatedUser class.
Represents a host-side model that may be transformed into a TApiModel .
Represents a host-side model that may be transformed into a TApiModel .