Esempio n. 1
0
        protected IDerivedState <TResult> BindToDerivedState <TInput, TResult>(IState <TInput> state, Func <TInput, TResult> derive)
        {
            var derivedState = new DerivedState <TInput, TResult>(state, derive);

            boundStates.Add(state, ValueSelector.Create(derive));
            return(derivedState);
        }
 public static void SetLevel(string prefix, Level?flags)
 {
     MySession.Static.Log.Info($"EquinoxCore Logging level for \"{prefix}\" set to {flags?.ToString() ?? "nil"}");
     if (flags.HasValue)
     {
         State[prefix] = flags.Value;
     }
     else
     {
         State.Remove(prefix);
     }
     _anythingEnabled = State.Count > 0;
     DerivedState.Clear();
 }