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)); }
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); }