tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
UserName.cs
Go to the documentation of this file.
2{
6 public class UserName : NamedEntity
7 {
9 [RequestOptions(FieldPresence.Optional)]
10 public override string? Name
11 {
12 get => base.Name;
13 set => base.Name = value;
14 }
15
20 public UserName CreateUserName() => CreateUserName<UserName>();
21
27 protected virtual TResultType CreateUserName<TResultType>()
28 where TResultType : UserName, new() => new()
29 {
30 Id = Id,
31 Name = Name,
32 };
33 }
34}
virtual ? long Id
The ID of the entity.
Definition EntityId.cs:13
Base class for named entities.
Definition NamedEntity.cs:9
virtual ? string Name
The name of the entity represented by the NamedEntity.
Base class for user names.
Definition UserName.cs:7
virtual TResultType CreateUserName< TResultType >()
Create a copy of the UserName as a given TResultType .
Definition UserName.cs:27
UserName CreateUserName()
Create a copy of the UserName.
FieldPresence
Indicates whether a request field is Required or Ignored.