Ejemplo n.º 1
0
 internal P_LoopStartState(StatefulSynchronizationContext <TCtxState> context, ManualResetEventSlim loopStartedEvent)
 {
     context.EnsureNotNull(nameof(context));
     loopStartedEvent.EnsureNotNull(nameof(loopStartedEvent));
     //
     Context          = context;
     LoopStartedEvent = loopStartedEvent;
 }
Ejemplo n.º 2
0
 internal P_InvokeItem(
     StatefulSynchronizationContext <TCtxState> ctx,
     StatefulSynchronizationContextExecute <TCtxState, TUserState, TResult> @delegate,
     TUserState userState,
     CancellationToken contextCt,
     CancellationToken userCt)
     : base(ctx: ctx, ctxCt: contextCt, userCt: userCt)
 {
     //
     @delegate.EnsureNotNull(nameof(@delegate));
     //
     Delegate  = @delegate;
     UserState = userState;
 }
Ejemplo n.º 3
0
 public abstract void Invoke(StatefulSynchronizationContext <TCtxState> ctx, IVh <TCtxState> ctxState);
Ejemplo n.º 4
0
 protected P_InvokeItemBase(StatefulSynchronizationContext <TCtxState> ctx)
 {
     ctx.EnsureNotNull(nameof(ctx));
     //
     _ctx = ctx;
 }
Ejemplo n.º 5
0
 protected override void DoInvoke(StatefulSynchronizationContext <TCtxState> ctx, IVh <TCtxState> ctxState, out TResult result)
 => result = Delegate(ctx: ctx, ctxState: ctxState, state: UserState, ct: Ct);