tgstation-server 6.19.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
AndRightsConditional{TRights}.cs
Go to the documentation of this file.
1using System;
2
4{
9 public sealed class AndRightsConditional<TRights> : RightsConditional<TRights>
10 where TRights : Enum
11 {
16
21
28 {
29 this.lhs = lhs ?? throw new ArgumentNullException(nameof(lhs));
30 this.rhs = rhs ?? throw new ArgumentNullException(nameof(rhs));
31 }
32
34 public override bool Evaluate(TRights rights)
35 => lhs.Evaluate(rights) && rhs.Evaluate(rights);
36
38 public override string ToString()
39 => $"({lhs} && {rhs})";
40 }
41}
readonly RightsConditional< TRights > rhs
The right hand side operand.
readonly RightsConditional< TRights > lhs
The left hand side operand.
AndRightsConditional(RightsConditional< TRights > lhs, RightsConditional< TRights > rhs)
Initializes a new instance of the AndRightsConditional<TRights> class.