Example #1
0
 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));
 }
Example #2
0
        public ChatRoom EndOpenChat(IAsyncResult res)
        {
            if (openChatDel == null)
            {
                throw new InvalidOperationException("Something bad happened");
            }
            OpenChatDel tmp = openChatDel;

            openChatDel = null;
            return(tmp.EndInvoke(res));
        }
 public ChatRoom EndOpenChat(IAsyncResult res)
 {
     if (openChatDel == null)
         throw new InvalidOperationException ("Something bad happened");
     OpenChatDel tmp = openChatDel;
     openChatDel = null;
     return tmp.EndInvoke (res);
 }
 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);
 }