private SessionHandlerOptions GetSessionHandlerOptions()
{
// Initialize message pump options
var options = new SessionHandlerOptions
{
// Indicates if the message-pump should call complete on messages after the callback has completed processing.
AutoComplete = checkBoxAutoComplete.Checked,
// Gets or sets the maximum number of existing sessions.
MaxConcurrentSessions = txtMaxConcurrentCalls.IntegerValue,
// Gets or sets the time needed before the session renew its state.
AutoRenewTimeout = TimeSpan.FromSeconds(30),
// Gets or sets the time needed before the message waiting expires.
MessageWaitTimeout = TimeSpan.FromSeconds(30)
};
// Allows to get notified of any errors encountered by the message pump
options.ExceptionReceived += LogErrors;
return options;
}