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); }
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); }
private static void PrintAvailableCommands(MessagingFloomeen machine) { System.Console.WriteLine($"AvailableCommands '{string.Join(',', machine.AvailableCommands())}'"); }