public OrdersStorage(string apiUrl, ILoggerWriter loggerWriter = null, IJsonSerializer jsonSerializer = null) { _ordersProvider = new OrdersProvider(apiUrl, loggerWriter, jsonSerializer); }
public OrdersCreator(string apiUrl, ILoggerWriter loggerWriter = null, IJsonSerializer jsonSerializer = null) { _apiProxy = new OrdersApiProxy(apiUrl, loggerWriter, jsonSerializer); }
public OrdersProvider(string apiUrl, ILoggerWriter loggerWriter, IJsonSerializer jsonSerializer) { _apiProxy = new OrdersApiProxy(apiUrl, loggerWriter, jsonSerializer); }
public static void SetLogger(ILoggerWriter ilw) { InstructionLogger.loggerWriter = ilw; InstructionLogger.output = true; }
public Logger(string categoryName, ILoggerWriter writer) { _categoryName = categoryName; _writer = writer ?? throw new ArgumentNullException(nameof(writer)); }
public AbstractLogger(string name, Func <string, LogLevel, bool> filter, ILoggerWriter loggerWriter) { _name = string.IsNullOrEmpty(name) ? nameof(AbstractLogger) : name; _filter = filter ?? ((category, logLevel) => true); _loggerWriter = loggerWriter; }
/// <summary> /// 使用数据库存储日志 /// </summary> public static Spider UseDataBaseLog(this Spider spider, ILoggerWriter loggerWriter) { spider.AddLogProvider(new LogProvider(loggerWriter)); return(spider); }
public Logger(LoggerConfig config) { _config = config; _writer = new LoggerWriter(config.LogFile); }
public HttpRequester(IJsonSerializer jsonSerializer, ILoggerWriter loggerWriter) { _loggerWriter = loggerWriter; _jsonSerializer = jsonSerializer ?? new NewtonsoftSerializer(); _httpClient = new HttpClient(); }