/// <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); }
/// <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); }