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

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

            return(Task.FromResult(context));
        }