internal void ApplyEvent(ClientView view, ClientCreated @event) { view.Id = @event.ClientId; view.Name = @event.Data.Name; view.Email = @event.Data.Email; view.AccountsNumbers = new List <string>(); }
public void sendEvent(ClientItem clientItem) { Action <DeliveryReportResult <String, ClientCreated> > handler = r => Console.WriteLine(!r.Error.IsError ? $"Delivered message to {r.TopicPartitionOffset}" : $"Delivery Error: {r.Error.Reason}"); var clientName = new Name { firstname = clientItem.firstname, lastname = clientItem.lastname }; var clientAddress = new Address { street = clientItem.street, city = clientItem.city }; var clientCreated = new ClientCreated { id = clientItem.id.ToString(), Name = clientName, Address = clientAddress }; producerCreated .ProduceAsync("ClientCreated", new Message <String, ClientCreated> { Key = clientItem.id.ToString(), Value = clientCreated }) .ContinueWith(task => task.IsFaulted ? $"error producing message: {task.Exception.Message}" : $"produced to: {task.Result.TopicPartitionOffset}"); }
private void Handle(ClientCreated cr) { Log.Information("Added Client: {Id}, {Name}, {Address}, {Email}", cr.Id, cr.FirstName + " " + cr.LastName, cr.Address, cr.Email); //handle ClientCreated event }
private void Handle(ClientCreated evt) { var ci = indexer.Get <ClientInformation>(evt.ID); ClientInformation clientInfo; if (ci == null) { clientInfo = new ClientInformation() { ID = evt.ID, Name = evt.Name, Balance = 0 } } ; else { clientInfo = ci; clientInfo.Balance = 0; clientInfo.Name = evt.Name; } indexer.Index(clientInfo); }
private void Apply(ClientCreated obj) { this.ID = obj.ID; Name = obj.Name; balance = 0; }
private async void OnNavigationBarAddClicked(object sender, EventArgs e) { var clientData = await ViewModel.SaveNewClient(); if (ClientCreated != null) { ClientCreated.Invoke(clientData); } }
public ClientView Create(ClientCreated @event) { return(new ClientView { Id = @event.ClientId, Name = @event.Data.Name, Email = @event.Data.Email, AccountsNumbers = new List <string>() }); }
public static PrimusClient CreateClient() { var client = new PrimusClient(Guid.NewGuid()); _clients.Add(client.Guid, client); ClientCreated?.Invoke(client); return(client); }
private void CreateClient(CreateClient createClient) { logger.Info("Create client (Name: {0})", createClient.Name); string id = clientProcessorService.Create(null); var clientCreated = new ClientCreated(createClient.ProcessActor, id); Sender.Tell(clientCreated); }
public void Awake() { instance = this; DontDestroyOnLoad(this); GetUserInfo.UpdateUserInfo(); playerInfo = new PlayerInfo(GetUserInfo.GetUserName(), GetUserInfo.GetUserID()); NetPeerConfiguration Config = new NetPeerConfiguration("BeatSaberMultiplayer") { MaximumHandshakeAttempts = 2, AutoFlushSendQueue = false }; NetworkClient = new NetClient(Config); ClientCreated?.Invoke(); }
public void When(ClientCreated clientCreated) { ClientId = clientCreated.ClientId; }
internal void ApplyEvent(ClientCreated @event) { ClientName = @event.Data.Name; }
internal void ApplyEvent(ClientCreated @event) { Id = @event.Id; Name = @event.Data.Name; IsDeleted = false; }
private void ClientCreated(ClientCreated clientCreated) { var storeClient = new StoreClient(clientCreated.Id); clientCreated.ProcessActor.Tell(storeClient); }
internal static void RaiseClientCreated(ConnectionClient client) { Log.Out.Info($"Raising 'ClientCreated' event for {client.EndPoint}"); ClientCreated?.Invoke(new ClientCreatedEventArgs(client)); }
private List <Guid> FindClientAccountIds(IDocumentSession session, ClientCreated @event) { return(FindClientAccountIds(session, @event.ClientId)); }
private static bool OnClientCreated(ClientCreated arg) { return(true); }