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; }
private static void RemoveChannel(CastChannel channel) { if (channel.Users.Count() > 0) return; Channels.Remove(channel); }