Configuration

The bus can easily be configured by calling the Configure method.

PubSubLite.Bus.Configure()
    // SingleThread - all calls from the bus will execute on
    //                the same thread.
    // MessageHandlingInSeparateThreads - calls from the bus
    //                will excute on separate threads.
    .SetThreadSetting(ThreadSettings.MessageHandlingInSeparateThreads)
    // Multiple Loggers can be added by calling RegisterLogger more than
    // once while configuring.
    // Loggers must implement the IBusLogger interface (ConsoleLogger is
    // a simple logger in the demo project)
    .RegisterLogger(new ConsoleLogger())
    // Log level
    .SetLogLevel(BusLogLevel.Errors)
    // If true exceptions will be rethrown after logging.
    .SetRethrowExceptions(false)
    // If true debug info from the bus will be logged
    .SetLogDebugInfo(false);

Last edited Nov 5, 2010 at 8:41 AM by swmal, version 4

Comments

No comments yet.