コード例 #1
0
ファイル: Program.cs プロジェクト: joovnaz/Floomeen
        static void PlugMessagingFloomeen(out MessagingFloomeen floomeen, MessagePOCO message, FlooMessage email)
        {
            floomeen = Factory <MessagingFloomeen> .Create();

            floomeen.InjectAdapter <EmailGatewayAdapter>();

            floomeen.AddContextData(MessagingFloomeen.ContextKey.Message, email);

            floomeen.AddContextData(MessagingFloomeen.ContextKey.MaxRetries, new FlooInt(3));

            floomeen.Plug(message);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: joovnaz/Floomeen
        public static void Setup(CustomerPOCO customer, out MessagingFloomeen master, out FlipperFloomeen slave)
        {
            PlugFlipperFloomeen(out FlipperFloomeen flipperSlave, customer);

            slave = flipperSlave;

            var message = Messages.FirstOrDefault(m => m.MessageId == MessageId(customer.CustomerId)) ??

                          new MessagePOCO {
                MessageId = MessageId(customer.CustomerId)
            };

            var email = MessageToSend(customer);

            PlugMessagingFloomeen(out MessagingFloomeen messagingMaster, message, email);

            master = messagingMaster;

            var coordinator = new MessagingFlipperCoordinator(messagingMaster, flipperSlave);
        }
コード例 #3
0
 private static void PrintAvailableCommands(MessagingFloomeen machine)
 {
     System.Console.WriteLine($"AvailableCommands '{string.Join(',', machine.AvailableCommands())}'");
 }