コード例 #1
0
        private Variable Toggle(IClient client, bool?state)
        {
            Items.LogVar variable = client.GetLogVar(_id);
            bool         newState = state ?? !variable.State;

            variable.State = newState;
            return(Variable.Create(variable).WithState(newState));
        }
コード例 #2
0
 internal static Variable Create(Items.LogVar variable)
 => new Variable(
     id: variable.Index,
     name: variable.Name,
     state: variable.State);