コード例 #1
0
        private async Task <Message> HandleMessageAsync(Message message)
        {
            var state = messageRegister.RegisterMessage(message);

            if (state is UserStates.SecondLevel)
            {
                return(await Task.Run(() => SecondLevel(message)));
            }
            else
            {
                return(await FirstLevel(message));
            }
        }
コード例 #2
0
 public static void Register(IMessageRegister register)
 {
     register.RegisterMessage <ClassA, ClassA>(1);
     register.RegisterMessage <ClassA>(2);
 }