namespace InnovEnergy.Lib.StatusData; public readonly struct State { public IReadOnlyList Values { get; } public State(IReadOnlyList values) => Values = values; public State(params String[] values) : this((IReadOnlyList)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); // parallel public static State operator |(State left, State right) => new State(left, right); }