Example #1
0
 public Worker(
     ILogger <Worker> logger,
     IConfiguration configuration)
 {
     _logger = logger;
     _config = new GalleryOptions();
     configuration.Bind(_config);
 }
Example #2
0
        public static GalleryService Instance(GalleryOptions config)
        {
            if (_service != null)
            {
                return(_service);
            }

            var provider     = new GalleryProvider(config);
            var azureGallery = provider.ReadAzureGalleryJson();

            _service = new GalleryService(azureGallery);
            return(_service);
        }
Example #3
0
 public HomeController(IOptions <GalleryOptions> optionsAccessor)
 {
     _options = optionsAccessor.Value;
 }
Example #4
0
 public FileService(GalleryOptions config)
 {
     _config = config;
     _galleryJsonFullName = Path.Combine(_config.LocalGalleryDirectory, _config.GalleryJsonName);
 }
Example #5
0
 public AzureService(GalleryOptions config)
 {
     _config       = config;
     _azureAccount = CloudStorageAccount.Parse(_config.AzureStorageConnectionString);
 }