当前位置: 首页>>代码示例>>C#>>正文


C# JID.ToString方法代码示例

本文整理汇总了C#中jabber.JID.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# JID.ToString方法的具体用法?C# JID.ToString怎么用?C# JID.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jabber.JID的用法示例。


在下文中一共展示了JID.ToString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ChatHandler

        public ChatHandler(Account account, bool isMucUser, JID jid)
            : base(account)
        {
            m_Jid = jid;
            m_IsMucUser = isMucUser;

            base.Account.ConnectionStateChanged += HandleConnectionStateChanged;
            base.Ready = (base.Account.ConnectionState == AccountConnectionState.Connected);

            base.AppendStatus(String.Format("Conversation with {0}.", jid.ToString()));
        }
开发者ID:jrudolph,项目名称:synapse,代码行数:11,代码来源:ChatHandler.cs

示例2: Test_Create

 [Test] public void Test_Create()
 {
     JID j = new JID("foo", "jabber.com", "there");
     Assert.AreEqual("[email protected]/there", j.ToString());
     j = new JID(null, "jabber.com", null);
     Assert.AreEqual("jabber.com", j.ToString());
     j = new JID("foo", "jabber.com", null);
     Assert.AreEqual("[email protected]", j.ToString());
     j = new JID(null, "jabber.com", "there");
     Assert.AreEqual("jabber.com/there", j.ToString());
 }
开发者ID:krbysn,项目名称:jabber-net,代码行数:11,代码来源:JIDTest.cs

示例3: m_pres_OnPrimarySessionChange

        private void m_pres_OnPrimarySessionChange(object sender, JID bare)
        {
            Presence pres = m_pres[bare];
            LinkedList nodelist = (LinkedList) m_items[bare.ToString()];
            if (nodelist == null)
                return;

            foreach (ItemNode n in nodelist)
            {
                n.ChangePresence(pres);
            }
        }
开发者ID:eNoise,项目名称:cyclops-chat,代码行数:12,代码来源:RosterTree.cs

示例4: ReceiveMessage

        private Message ReceiveMessage(JID inJId, NUnit.Framework.Constraints.Constraint inMatcher)
        {
            Message result;

            Assert.That(mQueue.TryPoll(TimeSpan.FromSeconds(5), out result), Is.True,  "5秒間に何らかのメッセージが送られてこなければならない");
            Assert.That(result, Is.Not.Null);
            Assert.That(result.Body, inMatcher);
            Assert.That(result.From.ToString(), Is.EqualTo(inJId.ToString()));

            return result;
        }
开发者ID:transcript-goos,项目名称:ritalin,代码行数:11,代码来源:FakeAuctionServer.cs

示例5: OpenChatWindow

 public void OpenChatWindow(JID jid, bool isMucUser, bool focus, ChatHandlerEvent callback)
 {
     QApplication.Invoke(delegate {
         IChatHandler handler = null;
         string windowJid = isMucUser ? jid.ToString() : jid.Bare;
         lock (m_ChatWindows) {
             if (!m_ChatWindows.ContainsKey(windowJid)) {
                 handler = new ChatHandler(m_Account, isMucUser, windowJid);
                 var window = new ChatWindow(handler);
                 window.Closed += HandleChatWindowClosed;
                 m_ChatWindows.Add(windowJid, window);
                 Gui.TabbedChatsWindow.AddChatWindow(window, focus);
             } else {
                 var window = m_ChatWindows[windowJid];
                 if (focus) {
                     Gui.TabbedChatsWindow.FocusChatWindow(window);
                 }
                 handler = (ChatHandler)window.Handler;
             }
         }
         if (callback != null) {
             callback(handler);
         }
     });
 }
开发者ID:toothrot,项目名称:synapse,代码行数:25,代码来源:TabbedChatsWindow.cs

示例6: IsUserOnline

 /// <summary>Is the peer online to the best of our knowledge.</summary>
 public bool IsUserOnline(JID jid)
 {
   if(!_online.ContainsKey(jid.ToString())) {
     return jid.Equals(_jc.JID);
   }
   return true;
 }
开发者ID:hseom,项目名称:brunet,代码行数:8,代码来源:XmppService.cs

示例7: SendTo

    /// <summary>Send a Query to a remote peer.</summary>
    public bool SendTo(Element msg, JID to)
    {
      if(!_online.ContainsKey(to.ToString())) {
        return false;
      }

      SendByIQ(msg, to);
      return true;
    }
开发者ID:hseom,项目名称:brunet,代码行数:10,代码来源:XmppService.cs

示例8: ReceivedMood

        void ReceivedMood(JID from, string node, PubSubItem item)
        {
            Mood mood = (Mood)item["mood"];

            m_FriendMoods[from.Bare] = mood;

            // Only show in feed if we know this is a recent event.
            if (mood["timestamp"] != null && DateTime.Now.Subtract(DateTime.Parse(mood["timestamp"].InnerText)).TotalSeconds <= 60) {
                m_Account.PostActivityFeedItem(from.ToString(), "mood", mood.MoodName, mood.Text);
            }
        }
开发者ID:jrudolph,项目名称:synapse,代码行数:11,代码来源:UserMood.cs


注:本文中的jabber.JID.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。