Ejemplo n.º 1
0
    public Task <IExtensionScope> BeginExecuteAsync(ExecutionOptions options)
    {
        var             context = _services.GetRequiredService <T>();
        IExtensionScope scope   = new ContextExtensionScope <T>(context);

        return(Task.FromResult(scope));
    }
Ejemplo n.º 2
0
    public Task <IExtensionScope> BeginExecuteAsync(ExecutionOptions options)
    {
        var             scope   = _serviceProvider.CreateScope();
        IExtensionScope context = new ContextExtensionScope <IServiceScope>(
            scope);

        return(Task.FromResult(context));
    }