public static IObservable <Unit> ReloadWithTestWorker(params string[] args) { return(Rxn.Create <Unit>(o => { var apiName = args.Skip(1).FirstOrDefault(); var testHostUrl = GetTestarenaUrlFromArgs(args); theBfg.Args = args; RxnExtensions.DeserialiseImpl = (t, json) => JsonExtensions.FromJson(json, t); RxnExtensions.SerialiseImpl = (json) => JsonExtensions.ToJson(json); var cfg = RxnAppCfg.Detect(args); //var appStore = new CurrentDirectoryAppUpdateStore(); //var clusterHost = OutOfProcessFactory.CreateClusterHost(args, appStore, cfg); return theBfgDef.TestWorker(apiName, testHostUrl, RxnApp.SpareReator(testHostUrl)).ToRxns() .Named(new bfgAppInfo("bfgWorker")) .OnHost(new ConsoleHostedApp(), cfg) .SelectMany(h => h.Run().Do(app => { theBfg.IsReady.OnNext(app); })) .Select(app => { return new Unit(); }) .Subscribe(o); })); }
public static IObservable <Unit> ReloadWithTestArena(params string[] args) { return(Rxn.Create <Unit>(o => { ReportStatus.StartupLogger = ReportStatus.Log.ReportToConsole(); theBfg.Args = args; "Configuring App".LogDebug(); theBFGAspNetCoreAdapter.Appcfg = RxnAppCfg.Detect(args); return AspNetCoreWebApiAdapter.StartWebServices <theBFGAspNetCoreAdapter>(theBFGAspNetCoreAdapter.Cfg, args).ToObservable() .LastAsync() .Select(_ => new Unit()) .Subscribe(o); })); }