public InterceptUnitOfWork(List <InterceptLayer <TArg, TResult> > layers, LogicOfTo <TArg, TResult> functionToIntercept, TArg arg) { Condition.Requires(layers).IsNotNull(); Condition.Requires(functionToIntercept).IsNotNull(); //if no logger is provided use an in memory store this.Logger = StoreLogger.New(NamedNaturalInMemoryStore.New("intercept log")); this.Layers = layers; this.FunctionToIntercept = functionToIntercept; this.Arg = arg; }
public static ILogger GetFileLogger(string path) { var logger = StoreLogger.New(NaturalInMemoryStore.New().Polls()); logger.Store.GetPoll().SetBackgroundAction(LogicOf <IStore> .New((store) => { var dat = StoreSerializer.SerializeStore(store, ValueManagerChainOfResponsibility.NewDefault()); Debug.WriteLine(dat); dat.MakeStringable().Fileable().Filing(path).Write(); }), 100); return(logger); }
public MessageStore(string workingDirectory) { this.log = new StoreLogger(); this.fileStore = new FileStore(workingDirectory); }