Beispiel #1
0
 public AsyncClass(ILogger logger, TContext context, DispatcherHandle mainDispatcher, DispatcherHandle userDispatcher)
 {
     // constructor used when coordinating sequencing with container
     Logger          = logger ?? throw new ArgumentNullException(nameof(logger));
     _context        = context;
     _mainDispatcher = mainDispatcher ?? throw new ArgumentNullException(nameof(mainDispatcher));
     _userDispatcher = userDispatcher ?? new Dispatcher(logger, GetType().Name + "-User").GetDispatcherHandle(".");
 }
Beispiel #2
0
 // asynchronous extensions
 public AsyncClass(ILogger logger, TContext context)
 {
     // default constructor
     Logger          = logger ?? throw new ArgumentNullException(nameof(logger));
     _context        = context;
     _mainDispatcher = new Dispatcher(logger, GetType().Name + "-Main").GetDispatcherHandle(".");
     _userDispatcher = new Dispatcher(logger, GetType().Name + "-User").GetDispatcherHandle(".");
 }