public IAsyncResult BeginOpenChat(string room,AsyncCallback callback,object @object) { if (openChatDel != null) throw new InvalidOperationException ("Can't open multiple Chats at a time"); openChatDel = new OpenChatDel (OpenChat); return openChatDel.BeginInvoke (room, callback,@object); }
static void Session_SessionAutenticated (object sender, EventArgs e) { Console.WriteLine ("Authenticated"); Console.Write ("Room name:"); string room = Console.ReadLine (); session.BeginOpenChat (room, new AsyncCallback (EndOpenChat), null); }