add implicit op for booleans on State
This commit is contained in:
parent
08c747f2ea
commit
d91a4654cd
|
@ -14,11 +14,10 @@ public readonly struct State
|
|||
|
||||
public State(params String[] values) : this((IReadOnlyList<String>)values){}
|
||||
public State(params State[] states) : this(states.SelectMany(s => s.Values).ToList()){}
|
||||
|
||||
public State(Enum e) : this(e.ToString()){}
|
||||
|
||||
public static implicit operator State(Enum e) => new State(e);
|
||||
public static implicit operator State(String s) => new State(s);
|
||||
public static implicit operator State(String s) => new State(s);
|
||||
public static implicit operator State(Enum e) => new State(e.ToString());
|
||||
public static implicit operator State(Boolean s) => new State(s.ToString());
|
||||
|
||||
public static State operator |(State left, State right) => new State(left, right);
|
||||
|
||||
|
|
Loading…
Reference in New Issue