public void UseMiddleware_add_middleware_that_no_options() { var options = new LoggerOptions(); var store = new StoreBuilder <AppState>(new AppReducer()) .UseDummy() .UseLogger(options) .Build(); Assert.Equal(1, options.Buffer.Count); Assert.Equal(typeof(DummyAction).FullName, options.Buffer[0]); }
public static IStoreBuilder <TState> UseLogger <TState>(this IStoreBuilder <TState> store, LoggerOptions options) { return(store.UseMiddleware <LoggerMiddleware <TState> >(options)); }
public LoggerMiddleware(IStore <TState> store, DispatchDelegate next, LoggerOptions options) { _store = store; _next = next; _options = options; }
public LoggerMiddleware(IStore <TState> store, Dispatcher next, LoggerOptions options) { this.store = store; this.next = next; this.options = options; }