/// <summary> /// Expose the only instance of runtime /// </summary> public static IInsightRuntime GetInstance(ILogProvider logProvider, IStoreProvider storeProvider, Config config, IPerformanceSessionManager perfSessionMgr, ITaskRunner runner, CancellationToken token, bool isTest = false) { return(new DefaultInsightRuntime(logProvider, storeProvider, config, perfSessionMgr, runner, isTest, token)); }
private DefaultInsightRuntime(ILogProvider logProvider, IStoreProvider storeProvider, Config config, IPerformanceSessionManager perfSessionalManager, ITaskRunner runner, bool isTest, CancellationToken token) { Assert.IsNotNull(logProvider, "Log Provider can't be null"); Assert.IsNotNull(storeProvider, "store provider can't be null"); Assert.IsNotNull(config, "Config can't be null"); Assert.IsNotNull(perfSessionalManager, "perfSessionalManager"); Assert.IsNotNull(runner, "runner"); this.logProvider = logProvider; this.storeProvider = storeProvider; this.config = config; this.PerformanceSessionManager = perfSessionalManager; this.TaskRunner = runner; this.Token = token; this.testMode = isTest; }