public void HandleRemoteStitchCreated(ReceivedEvent received, StitchInstanceEvent instanceEvent) { _data.StitchCache.AddRemoteStitch(received.FromNodeId, received.FromNetworkId, instanceEvent.InstanceId, instanceEvent.GroupName); _log.LogDebug("Adding new remote stitch Id={0} NodeId={1} to lookup cache", instanceEvent.InstanceId, received.FromNodeId); }
public void TestComboBoxSelectedIndexChanged(ReceivedEvent receivedEvent) { MessageBox.Show($"{((Control)receivedEvent.Source).Name} {receivedEvent.Event.EventName}."); }
static void Main(string[] args) { var nodeConfig = NodeConfiguration.GetDefault(); using (var core = new CrossStitchCore(nodeConfig)) { core.MessageBus.Subscribe <NodeAddedToClusterEvent>(s => s.WithTopic(NodeAddedToClusterEvent.EventName).Invoke(NodeAdded)); core.MessageBus.Subscribe <NodeRemovedFromClusterEvent>(s => s.WithTopic(NodeRemovedFromClusterEvent.EventName).Invoke(NodeRemoved)); core.MessageBus.Subscribe <ObjectReceivedEvent <NodeStatus> >(b => b .WithTopic(ReceivedEvent.ReceivedEventName(NodeStatus.BroadcastEvent)) .Invoke(ReceiveNodeStatus)); core.MessageBus.TimerSubscribe("tick", 1, b => b.Invoke(m => SendPing(core))); core.AddModule(new BackplaneModule(core)); var logger = new LoggerFactory().AddConsole(LogLevel.Debug).CreateLogger <Program>(); core.AddModule(new LoggingModule(core, logger)); core.Start(); core.Log.LogInformation("Started MASTER node {0}", core.NodeId); Console.ReadKey(); core.Log.LogInformation("Stopping node {0}", core.NodeId); core.Stop(); } }
public void TestComboBoxClick(ReceivedEvent receivedEvent) { MessageBox.Show($"{((Control)receivedEvent.Source).Name} {receivedEvent.Event.EventName}."); }