/// <summary> /// Create an x:data form from the given message stanza. /// </summary> /// <param name="parent">Original stanza</param> public XDataForm(jabber.protocol.client.Message parent) : this(FindData(parent) as jabber.protocol.x.Data) { m_stanza = (Packet) parent.CloneNode(true); Data d = FindData(m_stanza); Debug.Assert(d != null); m_parent = (Element)d.ParentNode; m_parent.RemoveChild(d); }
public void Test_Create() { Packet p = new Packet("foo", doc); Assert.AreEqual("<foo />", p.ToString()); p.To = "one"; Assert.AreEqual("<foo to=\"one\" />", p.ToString()); p.From = "two"; Assert.AreEqual("<foo to=\"one\" from=\"two\" />", p.ToString()); p.Swap(); Assert.AreEqual("<foo to=\"two\" from=\"one\" />", p.ToString()); }
/// <summary> /// Create an x:data form from the given iq stanza. /// </summary> /// <param name="parent">Original stanza</param> public XDataForm(jabber.protocol.client.IQ parent) : this(FindData(parent)) { m_stanza = (Packet) parent.CloneNode(true); Data d = FindData(m_stanza); m_parent = (Element)d.ParentNode; m_parent.RemoveChild(d); }
public XmppRequestProxy(Packet packet) { m_Packet = packet; }