Example #1
0
        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);
        }
Example #2
0
 private static void Remove(EchoChannel entry)
 {
     Channels.Remove(entry.ChannelID);
     EchoUtil.Forwarders.Remove(entry.Action);
 }