protected static void HandleAtomic(AtomicMessage msg, SimpleMessageSender sender, IAtomicWriter<unit, int> arg3)
 {
     var count = arg3.AddOrUpdate(unit.it, () => 1, i => i + 1);
     if (count > 2)
     {
         sender.SendBatch(new object[] {}, e => e.AddString("ok"));
         return;
     }
     sender.SendOne(new AtomicMessage());
 }
Example #2
0
        public DomainLogView(LocalEventStore eventStore, SimpleMessageSender endpoint, IEnvelopeStreamer serializer)
        {
            InitializeComponent();

            _client = eventStore;

            _services = new ShellServices(endpoint);
            _serializer = serializer;

            _log.BackColor = CommonColors.Solarized.Base03;
            _log.ForeColor = CommonColors.Solarized.Base0;

            _display.BackColor = CommonColors.Solarized.Base3;
            _display.ForeColor = CommonColors.Solarized.Base00;

            _detailsLabel.BackColor = CommonColors.Solarized.Base2;
            _detailsLabel.ForeColor = CommonColors.Solarized.Base01;

            var control = new RepopulateView(serializer, eventStore, _services) {Dock = DockStyle.Fill};
            viewsTab.Controls.Add(control);
        }
Example #3
0
 public ShellServices(SimpleMessageSender client)
 {
     _client = client;
 }
Example #4
0
 public MessageSender(SimpleMessageSender sender)
 {
     _sender = sender;
 }
 protected static void HandleNuclear(NuclearMessage msg, SimpleMessageSender sender, NuclearStorage storage)
 {
     var count = storage.AddOrUpdateSingleton(() => 1, i => i + 1);
     if (count >= 2)
     {
         sender.SendBatch(new object[] {}, e => e.AddString("ok"));
         return;
     }
     sender.SendOne(new NuclearMessage());
 }