public async Task QueueAction( KernelCommandInvocation action) { var command = new AnonymousKernelCommand(action); await HandlingKernel.SendAsync(command); }
public AnonymousKernelCommand( KernelCommandInvocation handler, string targetKernelName = null) : base(targetKernelName) { Handler = handler; }
public KernelInvocationContext( KernelCommandInvocation invocation, Action <IKernelEvent> publishEvent) { _invocation = invocation; _publishEvent = publishEvent; }
private KernelInvocationContext( IKernelCommand command, KernelInvocationContext parentContext = null) { _parentContext = parentContext; Command = command; _invocation = command.InvokeAsync; }
public AnonymousKernelCommand( KernelCommandInvocation handler, string targetKernelName = null, KernelCommand parent = null) : base(targetKernelName, parent) { Handler = handler; ShouldPublishCompletionEvent = false; }
public void OnExecute(KernelCommandInvocation invocation) { if (invocation == null) { throw new ArgumentNullException(nameof(invocation)); } _invocations.Add(new KernelInvocationContext( invocation, _publishEvent)); }
public AnonymousKernelCommand(KernelCommandInvocation handler) { Handler = handler; }