LiveCodingChat.Livecoding.LivecodingSession.EndOpenChat C# (CSharp) Метод

EndOpenChat() публичный Метод

public EndOpenChat ( IAsyncResult res ) : ChatRoom
res IAsyncResult
Результат ChatRoom
        public ChatRoom EndOpenChat(IAsyncResult res)
        {
            if (openChatDel == null)
                throw new InvalidOperationException ("Something bad happened");
            OpenChatDel tmp = openChatDel;
            openChatDel = null;
            return tmp.EndInvoke (res);
        }

Usage Example

Пример #1
0
		private static void EndOpenChat(IAsyncResult res)
		{
			try{
			Livecoding.ChatRoom room = session.EndOpenChat (res);
			room.Client.MessageReceived += Room_Client_MessageReceived;;
			while (true) {
				string ln=Console.ReadLine ();
				if (ln == "exit") {
					run=false;
					break;
				}
				room.Room.SendMessage (ln);
			}
			}catch(Exception ex) {
				Console.WriteLine (ex.Message);
			}
		}