예제 #1
0
 public UserScrape(AzureContainers containers, RootCfg rootCfg, UserScrapeCfg cfg, SemVersion version)
 {
     Containers = containers;
     RootCfg    = rootCfg;
     Cfg        = cfg;
     Version    = version;
 }
예제 #2
0
 public UserScrape(AzureContainers containers, RootCfg rootCfg, UserScrapeCfg cfg, SemVersion version, YtStore store)
 {
     Containers = containers;
     RootCfg    = rootCfg;
     Cfg        = cfg;
     Version    = version;
     Store      = store.Store;
 }
예제 #3
0
        public static async Task <Cfg> LoadCfg(ILogger log = null)
        {
            var rootCfg = new RootCfg();

            rootCfg.AzureStorageCs = GetEnv("YtNetworks_AzureStorageCs");

            if (rootCfg.AzureStorageCs.NullOrEmpty())
            {
                throw new InvalidOperationException("AzureStorageCs variable not provided");
            }



            var storageAccount  = CloudStorageAccount.Parse(rootCfg.AzureStorageCs);
            var cloudBlobClient = storageAccount.CreateCloudBlobClient();
            var cfg             = (await cloudBlobClient.GetText("cfg", $"{rootCfg.Environment}.json")).ToObject <AppCfg>();

            return(new Cfg {
                App = cfg, Root = rootCfg
            });
        }
예제 #4
0
 public VersionInfoProvider(ILogger log, RootCfg rootCfg) =>