示例#1
0
        public static CastChannel NewChannel(String name)
        {
            if (Channels.Where(v => v.Name == name).Count() > 0)
                throw new AegisException(ResultCode.IMC_ExistsChannelName);

            CastChannel channel = new CastChannel(name);
            Channels.Add(channel);

            return channel;
        }
示例#2
0
        private static void RemoveChannel(CastChannel channel)
        {
            if (channel.Users.Count() > 0)
                return;

            Channels.Remove(channel);
        }