public SetupExecutorStub(IExecutorAsync current, Action <IExecutorAsync> setup) { _previous = current; _onDispose = setup; Stub = new ExecutorStubAsync(); setup(Stub); }
public RepositoryExecutorAsync(ISessionFactory sessionFactory, Func <INhSqlRepository> accessor, Action <INhSqlRepository> mutator, IExecutorAsync inner) { _sessionFactory = sessionFactory; _accessor = accessor; _mutator = mutator; _inner = inner; }
public static async Task <TReturn> ExecAsync <TReturn>(this IExecutorAsync executorAsync, IQuery <TReturn> query) { var context = new ExecutionContext { Executable = query }; return((TReturn)await executorAsync.ExecuteAsync(context)); }
public static void Startup(Schema schema, ILogger <MigrationRunner> migrationLogger) { DbMigration.Migrate <DbMigrations.V001.V000.Rev0_CreateUserTable>(schema, migrationLogger); _sessionFactory = BuildSessionFactory(schema.ConnectionString); ExecutorAsync = new ValidatingExecutorAsync( new RepositoryExecutorAsync(_sessionFactory, () => Repository.Value, r => Repository.Value = r, new ExecutorAsync())); }
/// <summary> /// Creates a new instance of NetCoreExecutors class. /// </summary> /// <param name="executor">An IExecutor implementation to handle synchronous execution.</param> /// <param name="executorAsync">An IExecutorAsync implementation to handle asynchronous execution.</param> public NetCoreExecutors(IExecutor executor, IExecutorAsync executorAsync) { _executor = executor; _executorAsync = executorAsync; }
public SetupMemoryLogic() { _previousNow = Registry.UtcNow; _previousRepository = Registry.Repository.Value = MemoryRepository = new NhSqlMemoryRepository(MemoryConstraints); _previousExecutorAsync = Registry.ExecutorAsync = new ExecutorAsync().UsingHandlersFromAssemblyWithType <Registry>(); }
public ValidatingExecutorAsync(IExecutorAsync inner) { _inner = inner; }
/// <summary> /// Creates a new instance of your controller. /// </summary> /// <param name="executor">Service implementation.</param> public EndpointController(IExecutorAsync executor) { _executor = executor; }
public static void Startup() { ExecutorAsync = new ValidatingExecutorAsync( new ExecutorAsync()); }