예제 #1
0
            public bool RemoveEntity(ManagedEntity entity)
            {
                if (!Entities.Remove(entity))
                {
                    return(false);
                }

                entity.DeauthorizeAll();
                return(true);
            }
예제 #2
0
            public bool AddEntity(ManagedEntity entity)
            {
                if (Entities.Any(e => e.Id == entity.Id))
                {
                    return(false);
                }

                Entities.Add(entity);

                entity.DeauthorizeAll();
                entity.Authorize(GetActiveAndSleepingMembers());

                return(true);
            }