protected void CreateConnection() { Logger.Info($"CreateConnection: {null}"); var connection = new Connection(Model.Name, Model.Host, Model.Port); if (NatsService.Create(connection, out var msg)) { Connections.Insert(0, connection); } Status = msg; InvokeAsync(StateHasChanged); }
protected void CreateSession() { Logger.Info($"{nameof(CreateSession)}: {Model}"); var session = new Session(Model.Name) { Checked = false, }; NatsService.Create(session, out _); NatsService.Save(); Sessions.SetData(NatsService.Configuration.Sessions); OnSelectedItemChanged(session); }
protected void CreateSubscription() { Logger.Info($"{nameof(CreateSubscription)}: {Model}"); var natsSubscription = new NatsSubscription(Model.Subject) { Checked = false, Subscribed = false }; if (NatsService.Create(natsSubscription, out _)) { Subscriptions.Insert(0, natsSubscription); } Subscribe(natsSubscription); }