public void Send(JsonOperationContext context, RachisHello helloMsg) { Send(context, new DynamicJsonValue { ["Type"] = nameof(RachisHello), [nameof(RachisHello.DebugSourceIdentifier)] = helloMsg.DebugSourceIdentifier, [nameof(RachisHello.DebugDestinationIdentifier)] = helloMsg.DebugDestinationIdentifier, [nameof(RachisHello.InitialMessageType)] = helloMsg.InitialMessageType, [nameof(RachisHello.TopologyId)] = helloMsg.TopologyId }); }
public void Send(JsonOperationContext context, RachisHello helloMsg) { if (_log.IsInfoEnabled) { _log.Info($"{helloMsg.DebugSourceIdentifier} says hello to {helloMsg.DebugDestinationIdentifier} with {helloMsg.InitialMessageType}"); } Send(context, new DynamicJsonValue { ["Type"] = nameof(RachisHello), [nameof(RachisHello.DebugSourceIdentifier)] = helloMsg.DebugSourceIdentifier, [nameof(RachisHello.DebugDestinationIdentifier)] = helloMsg.DebugDestinationIdentifier, [nameof(RachisHello.InitialMessageType)] = helloMsg.InitialMessageType, [nameof(RachisHello.TopologyId)] = helloMsg.TopologyId, [nameof(RachisHello.SendingThread)] = Thread.CurrentThread.ManagedThreadId, [nameof(RachisHello.ElectionTimeout)] = helloMsg.ElectionTimeout, [nameof(RachisHello.SourceUrl)] = helloMsg.SourceUrl, [nameof(RachisHello.DestinationUrl)] = helloMsg.DestinationUrl, }); }