private void OnUserConnected(object sender, NetEventArgs e) { UserUpdateSet.Send(new UpdateSet() { Models = this.Models.ToList(), ModelCount = this.Models.Count, }, RouterController.GetUser(e.User)); }
private void OnModelUpdated(object sender, ModelTrackerCollection <TModel> .ModelUpdatedEventArgs e) { if (SendMessages == false) { return; } UpdateModel m = new UpdateModel(); m.Id = e.UpdatedModel.Id; m.Model = e.UpdatedModel; ShardUpdateModel.Send(m); UserUpdateModel.Send(m); }
private void OnModelRemoved(object sender, ModelTrackerCollection <TModel> .ModelRemovedEventArgs e) { if (SendMessages == false) { return; } RemoveModel m = new RemoveModel(); m.Id = e.Model.Id; m.Model = e.Model; ShardRemoveModel.Send(m); UserRemoveModel.Send(m); }