Bloomberglp.Blpapi.Session
has a constructor that looks like this:
public Session(SessionOptions, Bloomberglp.Blpapi.EventHandler, EventDispatcher);
The EventDispatcher
class looks like this:
public sealed class EventDispatcher
{
public bool Start();
public void Stop();
public void Stop(EventDispatcher.StopOption stopOption);
public void DispatcherThread();
public int NumActiveThreads { get; }
public enum StopOption { SYNC, ASYNC }
}
In code I use it like:
Session session = new Session(sessionOptions, someEventHandler.Handle, new EventDispatcher(2));
Do I understand this correctly that this simply tells the Session
instance to use the dispatcher
when an event occurrs to delegate the Event
to the provided someEventHandler.Handle(Event, Session)
method?
What are the Start();
Stop();
and DispatcherThread()
methods for?
The EventDispatcher
is not documented anywhere so maybe someone has some experience with this.