public void OnUserRemovedEvent(IWriteLog w, string message) { if (UserRemoved != null) { UserRemoved(w, message); } }
public HttpRequestManager(HttpClient client, IMemoryCache memoryCache, IWriteLog writeLog, IHttpContextAccessor httpContext, IConfiguration configuration) { _client = client; _memoryCache = memoryCache; _writeLog = writeLog; _httpContext = httpContext; _configuration = configuration; }
public BaseService(HttpClient client, IConfiguration configuration, IMemoryCache memoryCache, IWriteLog writeLog, IHttpContextAccessor httpContext) { _client = client; _configuration = configuration; _memoryCache = memoryCache; _writeLog = writeLog; _httpContext = httpContext; }
/// <summary> /// 注册启动KLog /// </summary> /// <param name="host">主Host,如jbk、ypk、console</param> public static void Register(string host) { if (_logConsumers != null) { return; } _logConsumers = new List <Log>(); _logProducers = new List <Log>(); var connStr = ConfigurationManager.AppSettings["KLogConnStr"]; //默认间隔1分钟写一次日志 _waitTime = 60000; try { _level = int.Parse(ConfigurationManager.AppSettings["KLogLevel"]); } catch { //默认除了debug的日志外都记录 _level = 2; } try { //记录日志的方式(File文本,Mongodb、Sqlserver、Mysql、Oracle数据库,Excel表格。需要的自己去仿照LogByMongodb实现) var logMode = "Core.LogBy" + ConfigurationManager.AppSettings["KLogBy"]; //抽象工厂模式初始化日志类 var type = Type.GetType(logMode, true); _log = (IWriteLog)Activator.CreateInstance(type); } catch (Exception ex) { //默认用文本记录日志 _log = new LogByFile(); } _log.Init(host, connStr); Warn("进程启动!"); }
public MyNvLogProvider(IWriteLog writeLog, LogConfiguration logConfiguration) { _writeLog = writeLog; _logConfiguration = logConfiguration; }
public InserisciRichiestaSoccorsoAereo(HttpClient client, IConfiguration configuration, IMemoryCache cache, IWriteLog log, IHttpContextAccessor accessor) : base(client, configuration, cache, log, accessor) { }
public SetUscitaMezzo(HttpClient client, IConfiguration configuration, IMemoryCache memoryCache, IWriteLog writeLog, IHttpContextAccessor httpContext) : base(client, configuration, memoryCache, writeLog, httpContext) { }
public GetMezziUtilizzabili(HttpClient client, IConfiguration configuration, IGetStatoMezzi GetStatoMezzi, IGetDistaccamentoByCodiceSedeUC GetDistaccamentoByCodiceSedeUC, IGetAlberaturaUnitaOperative getAlberaturaUnitaOperative, IMemoryCache memoryCache, IGetPosizioneFlotta getPosizioneFlotta, IWriteLog writeLog, IHttpContextAccessor httpContext) : base(client, configuration, memoryCache, writeLog, httpContext) { _getStatoMezzi = GetStatoMezzi; _getDistaccamentoByCodiceSedeUC = GetDistaccamentoByCodiceSedeUC; _getAlberaturaUnitaOperative = getAlberaturaUnitaOperative; _getPosizioneFlotta = getPosizioneFlotta; }
public static void Error(IWriteLog s, string mes) { s.WriteTextLog(mes); }
public static void Warning(IWriteLog s, string mes) { s.WriteTextLog(mes); }
public static void Info(IWriteLog s, string mes) { s.WriteTextLog(mes); }
public GetToken(HttpClient client, IConfiguration configuration, IMemoryCache memoryCache, IWriteLog writeLog, IHttpContextAccessor httpContext) : base(client, configuration, memoryCache, writeLog, httpContext) { }
public GetTipologieSoccorsoAereo(HttpClient client, IConfiguration configuration, IMemoryCache cache, IWriteLog log, IHttpContextAccessor httpContext) : base(client, configuration, cache, log, httpContext) { }