Exemplo n.º 1
0
        public ReportClient(
            ILogger <ReportClient> logger,
            //IRestApiResolveApiUrl resovleReportApi,
            IServiceProvider sp,
            TracingSetting setting)
        {
            this._logger = logger;
            //this._resovleReportApi = resovleReportApi;
            this._sp   = sp;
            this._conf = setting;

            workThread = new Thread(this.Work);
            workThread.Start();
        }
 public static IServiceCollection AddAquirrelTrace(this IServiceCollection services, TracingSetting conf)
 {
     services.AddSingleton <ITraceClient, TraceClient>();
     services.AddSingleton <IReportClient, ReportClient>(sp => new ReportClient(
                                                             sp.GetRequiredService <ILogger <ReportClient> >(),
                                                             //sp.GetRequiredService<IRestApiResolveApiUrl>(),
                                                             sp, conf));
     return(services);
 }