Esempio n. 1
0
        public static void OnAddLike(dynamic message, SyncService s, SyncRoom room)
        {
            var res = new
            {
                CommandType = CommandType.UPDATELIKES.Value,
                Likes       = room.AddLike()
            };

            room.Broadcast(JsonConvert.SerializeObject(res));
        }
Esempio n. 2
0
        public static void OnSyncState(dynamic message, SyncService s, SyncRoom room)
        {
            if (s.Permissions == UserPermissionLevel.OWNER)
            {
                var res = new
                {
                    CommandType = CommandType.SYNCSTATE.Value,
                    State       = new
                    {
                        Paused = message.Paused,
                        Time   = message.Time
                    }
                };

                room.Broadcast(JsonConvert.SerializeObject(res));
            }
        }
Esempio n. 3
0
 public static void OnChat(dynamic message, SyncService s, SyncRoom room)
 {
     room.Broadcast(JsonConvert.SerializeObject(message));
 }