Example #1
0
 private static async Task HandleReplay(IServiceProvider services, ReplayCmd opts)
 {
     await services.GetRequiredService <StreamReplay>().Run(new StreamReplay.ReplayOptions
     {
         Type  = opts.Type,
         After = opts.After != null ? Instant.FromDateTimeOffset(opts.After.Value) : (Instant?)null
     });
 }
Example #2
0
 private static async Task HandleReplay(IServiceProvider services, ReplayCmd opts)
 {
     var typeArray = opts.Type.ToArray();
     await services.GetRequiredService <StreamReplay>().Run(new StreamReplay.ReplayOptions
     {
         Type  = typeArray.Length == 0 ? null : typeArray,
         Start = opts.Start != null ? Instant.FromDateTimeOffset(opts.Start.Value) : (Instant?)null,
         End   = opts.End != null ? Instant.FromDateTimeOffset(opts.End.Value) : (Instant?)null
     });
 }