本文整理汇总了C#中agsXMPP.protocol.client.Presence.RemoveAttribute方法的典型用法代码示例。如果您正苦于以下问题:C# Presence.RemoveAttribute方法的具体用法?C# Presence.RemoveAttribute怎么用?C# Presence.RemoveAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类agsXMPP.protocol.client.Presence
的用法示例。
在下文中一共展示了Presence.RemoveAttribute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProcessPresence
//.........这里部分代码省略.........
ri.Subscription = contact.SubscriptionType;
foreach (string strGroup in contact.Groups)
{
ri.AddGroup(strGroup);
}
newRosterIq.Query.AddRosterItem(ri);
bSend = Send(userAccount, newRosterIq);
if (!bSend)
{
}
//<presence xmlns="jabber:client" type="subscribed" to="[email protected]" from="[email protected]" />
Presence newPresence = new Presence();
newPresence.Namespace = agsXMPP.Uri.CLIENT;
newPresence.Type = PresenceType.subscribed;
newPresence.From = new Jid(this.m_ClientAccount.JID.Bare);
newPresence.To = presence.To;
bSend = Send(presence.To, newPresence);
if (!bSend)
{
}
//<presence xmlns="jabber:client" from="[email protected]/MF" xml:lang="zh-cn" to="[email protected]/MF">
// <priority>10</priority>
//</presence>
newPresence.RemoveAttribute("type");
newPresence.Language = this.objClientlanguage.Name;
newPresence.Priority = 10;
Send(presence.To, newPresence);
}
#endregion
#region unsubscribe
else if (presence.Type == PresenceType.unsubscribe)
{
}
#endregion
#region unsubscribed
else if (presence.Type == PresenceType.unsubscribed)
{
//RECV:
// <presence xmlns="jabber:client" type="unsubscribed" to="[email protected]" />
//SEND:
// <iq id="168" type="set">
// <query xmlns="jabber:iq:roster">
// <item jid="[email protected]" name="test2" subscription="none" />
// </query>
// </iq>
//SEND: <presence xmlns="jabber:client" type="unsubscribed" to="[email protected]/MF" from="[email protected]" />
//SEND: <presence from="[email protected]/MF" xml:lang="zh-cn" type="unavailable" to="[email protected]/MF" />
// push roster set iq to all the resurce
RosterIq newRosterIq = null;
RosterItem ri = null;