public async Task Send(JsonObject data) { OnJsonDataSend?.Invoke(this, data); if (socketClient.ConnectionStatus == ConnectionStatus.Connected) { await socketClient.Send(Guid.Empty, data).ConfigureAwait(false); } }
public async Task Send(string sender, JsonObject data) { data.AddValue(nameof(FixedNames.Sender), sender); OnJsonDataSend?.Invoke(sender, data); if (socketClient.ConnectionStatus == ConnectionStatus.Connected) { await socketClient.Send(Guid.Empty, data).ConfigureAwait(false); } }
public async Task Send(ControllerBase sender, JsonObject data) { data.AddValue(nameof(FixedNames.Sender), sender.controllerName); data.AddValue(nameof(FixedNames.Target), sender.targetComponentName); OnJsonDataSend?.Invoke(sender, data); if (socketClient.ConnectionStatus == ConnectionStatus.Connected) { await socketClient.Send(Guid.Empty, data).ConfigureAwait(false); } }