public MarkovNode <T> AddNext(MarkovNode <T> next) { if (Nexts.ContainsKey(next)) { Nexts[next]++; } else { Nexts.Add(next, 1); } next.Occurrence++; return(this); }
public AppFunc AppFuncBuilder(AppFunc next) { ++AppFuncBuilderCallCount; #pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously return(async(IDictionary <string, object> environment) => { Environments.Add(environment); Nexts.Add(next); Action?.Invoke(); if (ChainToNextAppFunc) { next(environment).Wait(); } }); }