Example #1
0
        static IServiceCollection AddEventStoreProcess(this IServiceCollection services) =>
        services
        .BindOptionsToConfiguration <EventStoreProcessOptions>("eventStoreProcess")
        .AddSingleton(p =>
        {
            var processOptions  = p.GetOptions <EventStoreProcessOptions>();
            var timelineOptions = p.GetOptions <EventStoreTimelineOptions>();

            Expect.That(processOptions.ExeFile).IsNot("<user secret>", "The eventStoreProcess:exeFile options is required, generally as a user secret");

            var command = new EventStoreProcessCommand(
                processOptions.ExeFile,
                timelineOptions.Server.TcpPort,
                timelineOptions.Server.HttpPort);

            return(new EventStoreProcess(command, processOptions.ReadyDelay));
        });
Example #2
0
 internal EventStoreProcess(EventStoreProcessCommand command, TimeSpan readyDelay)
 {
     _command    = command;
     _readyDelay = readyDelay;
 }