Ejemplo n.º 1
0
        public IContentBuilder AddLogger <TLogger>(Func <TLogger> factory) where TLogger : IContentLogger
        {
            if (factory is null)
            {
                throw new ArgumentNullException(nameof(factory));
            }

            ContentLogger = factory();
            return(this);
        }
Ejemplo n.º 2
0
 public ContentUpdater(
     IContentSource contentSource,
     TimeSpan startupDelay,
     TimeSpan interval,
     IContentLogger logger,
     IContentClassGenerator classGenerator
     )
 {
     _contentSource  = contentSource;
     _startupDelay   = startupDelay;
     _interval       = interval;
     _logger         = logger;
     _classGenerator = classGenerator;
 }
Ejemplo n.º 3
0
 public ApiContentSource(Func <HttpClient> httpClientFactory, ApiContentSourceOptions options, IContentLogger logger)
 {
     _httpClientFactory = httpClientFactory;
     _options           = options ?? throw new ArgumentNullException(nameof(options));
     _logger            = logger;
 }
Ejemplo n.º 4
0
 public ProtoFileContentSource(string location, IContentLogger logger)
 {
     _location = location;
     _logger   = logger;
 }