public Connection(IAppId appId, IPrepareConfigService configuration, IHealthcheck healthcheck) { Configuration = configuration; IsConnected = false; AppId = appId; healthcheck.AddCheck(() => IsConnected); }
public CoreDispatcher(IPrepareConfigService config, IAppId appId, ICoreConnection coreConnection, IResolver resolver, IHealthcheck healthcheck) { Config = config; AppId = appId.CurrentUID; Connection = coreConnection; Resolver = resolver; healthcheck.AddCheck(() => running); Resolver.Stopped += (appid) => { running = false; }; Resolver.Started += Resolver_Started; }
// public ConcurrentDictionary<string, List<ResolverInvoker>> pending = new ConcurrentDictionary<string, List<ResolverInvoker>>(); public Resolver(IMemoryCache memoryCache, ICoreConnection connection, IPrepareConfigService configuration, IHealthcheck healthcheck, IAppId appId) { Configuration = configuration; AppId = appId.CurrentUID; Connection = connection; Cache = memoryCache; Bind = false; healthcheck.AddCheck(() => Bind); connection.Connected += Connection_Connected; connection.Disconnected += (appid) => { Bind = false; Stopped?.Invoke(appid); if (cancellationRefreshCache != null) { Trace.TraceInformation("Cache refresh stopped"); cancellationRefreshCache.Cancel(); } }; }
public MyTestService(ICoreDispatcher dispatcher, IPrepareConfigService config) : base(dispatcher) { this.config = config; }
public Healthcheck(IPrepareConfigService configuration) { checks = new List <Func <bool> >(); ConfigMq = configuration.MQ; }