/// <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; this.pendingMessages = new Queue<XmppMessage>(); this.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; this.presence = new XmppContactPresence(this.session); this.capabilities = new XmppClientCapabilities(); this.pendingMessages = new List<string>(); this.Subscribe(); }
/// <summary> /// Closes this instance. /// </summary> public void Close() { if (this.ChatClosing != null) { this.ChatClosing(this, new EventArgs()); } this.SendChatStateNotification(XmppChatStateNotification.Gone); this.pendingMessages.Clear(); this.Unsubscribe(); this.pendingMessages = null; if (this.ChatClosed != null) { this.ChatClosed(this, new EventArgs()); } this.session = null; this.contact = null; }