コード例 #1
0
ファイル: XmppChat.cs プロジェクト: tshwangq/Hanoi
        /// <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();
        }
コード例 #2
0
ファイル: XmppChat.cs プロジェクト: MustafaUzumcuCom/Hanoi
        /// <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();
        }
コード例 #3
0
        /// <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();
        }
コード例 #4
0
ファイル: XmppContactResource.cs プロジェクト: tshwangq/Hanoi
        /// <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();
        }
コード例 #5
0
ファイル: XmppChat.cs プロジェクト: MustafaUzumcuCom/Hanoi
        /// <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;
        }
コード例 #6
0
ファイル: XmppChat.cs プロジェクト: tshwangq/Hanoi
        /// <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;
        }