JulesMBooth / jabber-net

Automatically exported from code.google.com/p/jabber-net
Other
0 stars 0 forks source link

XmppStream.RemoveCallback enhancement #45

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
XmppStream.AddCallback, to match any element via XPath, is very
useful.

However, in some cases you only need to temporarily look for a
specific node. It would be helpful to call RemoveCallback. The most
logical place to call this is in the callback's own handler. The
problem is that you can't call RemoveCallback from within a handler,
since that would modify the XmppStream.m_callbacks list, which is
being used in XmppStream.CheckAll(), and it throws an exception.

Is there any chance this type of calling pattern can be accomodated,
or suggest 'where' one should call RemoveCallback? It may not be a
trivial fix. 

Original issue reported on code.google.com by jcpst...@gmail.com on 6 Oct 2008 at 1:53