예제 #1
0
 public static Options UseReduxDevTools(this Options options)
 {
     options.AddMiddleware <ReduxDevToolsMiddleware>();
     options.Services.AddScoped <ReduxDevToolsInterop>();
     options.UseRouting();
     return(options);
 }
        public static Options UsePersist(this Options options, Action <PersistMiddlewareOptions> persistMiddlewareOptions = null)
        {
            var middlewareOptions = new PersistMiddlewareOptions();

            persistMiddlewareOptions?.Invoke(middlewareOptions);
            options.AddMiddleware <PersistMiddleware>();
            options.Services.AddScoped(_ => middlewareOptions);
            return(options);
        }
예제 #3
0
        public static Options UseReduxDevTools(
            this Options options,
            Action <ReduxDevToolsMiddlewareOptions> updateReduxOptions = null)
        {
            var reduxOptions = new ReduxDevToolsMiddlewareOptions();

            updateReduxOptions?.Invoke(reduxOptions);

            options.AddMiddleware <ReduxDevToolsMiddleware>();
            options.Services.AddScoped <ReduxDevToolsInterop>();
            options.Services.AddScoped(_ => reduxOptions);
            options.UseRouting();
            return(options);
        }
예제 #4
0
 public static Options AddStoreLoggerMiddleware(
     this Options options, StoreLoggerOptions loggerOptions)
 {
     options = options.AddMiddleware <FluxorStoreLoggerMiddleware>();
     return(options);
 }
예제 #5
0
 public static Options UseRouting(this Options options)
 {
     options.AddMiddleware <RoutingMiddleware>();
     return(options);
 }