Пример #1
0
        public static void Save(Config parameters, MarkovChainString markovChain, Action <string> output)
        {
            output?.Invoke($"Saving '{parameters.Save}'");

            var saveBehaviour = new SaveBehaviour(markovChain, parameters.Save);

            saveBehaviour.Process();
            output?.Invoke($"Saved to '{parameters.Save}'");
        }
Пример #2
0
        private void SaveCallback(IrcMessageEventArgs message)
        {
            var brainFile = GetBrainFile(message);
            var saver     = new SaveBehaviour(_markovChainString, brainFile);

            saver.Process();

            var reply = message.CreateReply($"Saved brain '{brainFile}'");

            Bot.SendMessage(reply);
        }