private static void AddEchoChannel(ISocketMessageChannel c, ulong cid) { void Echo(string msg) => c.SendMessageAsync(msg); Action <string> l = Echo; EchoUtil.Forwarders.Add(l); var entry = new EchoChannel(cid, c.Name, l); Channels.Add(cid, entry); }
private static void Remove(EchoChannel entry) { Channels.Remove(entry.ChannelID); EchoUtil.Forwarders.Remove(entry.Action); }