예제 #1
0
 protected override void CreateActivateControl(
     RunControlOptions options,
     ResetServant <TDescription> component,
     RunControlAttemptStateFactory attemptState,
     Func <IRunControlAttemptState, Task> beforeActivate,
     Func <IRunControlAttemptState, Task> activate,
     Func <Task> deactivate,
     CancellationToken deactivationToken,
     out IRunControl <ResetServant <TDescription> > control)
 =>
 control =
     ReadIA(ref _activateControlFactory, locationName: nameof(_activateControlFactory))
         (options : options, component : component, attemptState : attemptState, beforeStart : beforeActivate, start : activate, stop : deactivate, stopToken : deactivationToken);
예제 #2
0
 protected virtual void CreateActivateControl(
     RunControlOptions options,
     TXAppScopeInstance component,
     RunControlAttemptStateFactory attemptState,
     Func <IRunControlAttemptState, Task> beforeActivate,
     Func <IRunControlAttemptState, Task> activate,
     Func <Task> deactivate,
     CancellationToken deactivationToken,
     out IRunControl <TXAppScopeInstance> control)
 =>
 control =
     new RunControl <TXAppScopeInstance>(
         options: options,
         component: component,
         attemptState: attemptState,
         beforeStart: beforeActivate,
         start: activate,
         stop: deactivate,
         stopToken: deactivationToken);