/// <summary> /// Initializes a new instance of the <see cref = "T:XmppChat" /> class. /// </summary> /// <param name = "session">The session.</param> /// <param name = "contact">The contact.</param> internal XmppChat(XmppSession session, XmppContact contact) { this.session = session; this.contact = contact; pendingMessages = new Queue<XmppMessage>(); Subscribe(); }
/// <summary> /// Initializes a new instance of the <see cref = "T:XmppChat" /> class. /// </summary> /// <param name = "session">The session.</param> /// <param name = "contact">The contact.</param> internal XmppChat(XmppSession session, XmppContact contact) { this.session = session; this.contact = contact; pendingMessages = new Queue <XmppMessage>(); Subscribe(); }
/// <summary> /// Initializes a new instance of the <see cref = "XmppContactResource" /> class. /// </summary> internal XmppContactResource(XmppSession session, XmppContact contact, XmppJid resourceId) { this.session = session; this.contact = contact; this.resourceId = resourceId; presence = new XmppContactPresence(this.session); capabilities = new XmppClientCapabilities(); pendingMessages = new List <string>(); Subscribe(); }
/// <summary> /// Initializes a new instance of the <see cref = "XmppContactResource" /> class. /// </summary> internal XmppContactResource(XmppSession session, XmppContact contact, XmppJid resourceId) { this.session = session; this.contact = contact; this.resourceId = resourceId; presence = new XmppContactPresence(this.session); capabilities = new XmppClientCapabilities(); pendingMessages = new List<string>(); Subscribe(); }
/// <summary> /// Closes this instance. /// </summary> public void Close() { if (ChatClosing != null) { ChatClosing(this, new EventArgs()); } SendChatStateNotification(XmppChatStateNotification.Gone); pendingMessages.Clear(); Unsubscribe(); pendingMessages = null; if (ChatClosed != null) { ChatClosed(this, new EventArgs()); } session = null; contact = null; }