Esempio n. 1
0
 private void OnShardConnected(object sender, NetEventArgs e)
 {
     ShardUpdateSet.Send(new UpdateSet()
     {
         Models     = this.Models.ToList(),
         ModelCount = this.Models.Count,
     }, RouterController.GetShard(e.User));
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }