protected override void parseHistoryItem(MemoryStream stream, JabberWire wire)
 {
     var parser = new StreamParser();
     parser.OnStreamElement += ((_sender, node) => { 
                                    elements.Add((Element)node);
                                });
     parser.Push(stream.GetBuffer(), 0, (int)stream.Length);
     parser.Push(closeTag, 0, closeTag.Length);
 }
Exemplo n.º 2
0
 /// <summary>
 /// This method is intended to be called ONLY by windows level automation emulating Jabber service.  
 /// Don't use it to pass XML back and forth as strings.  I'll find you.
 /// </summary>
 /// <param name="stream"></param>
 public virtual void ParseInjectedStream(string stream, Action<Element> action)
 {
     var parser = new StreamParser();
     parser.OnStreamElement += new StreamHandler((_sender, node) => action((Element)node));
     parser.Push(Encoding.UTF8.GetBytes(stream), 0, stream.Length);
 }