Exemple #1
0
        static void Main(string[] args)
        {
            ITgimbaDatabase   database   = new TgimbaDatabase(EnvironmentalConfig.GetDbSetting());
            ITgimbaHttpClient httpClient = new TgimbaHttpClient();
            ITgimbaPing       ping       = new TgimbaPing("https://www.tgimba.com/", httpClient, database);

            ping.PingWebSite();
        }
Exemple #2
0
        public static void Run([TimerTrigger("0 30 9 * * *")] TimerInfo myTimer, MS.ILogger log)
        {
            // NOTE: If using environmental variables, this has to be set up on the azure function cloud provider
            ITgimbaDatabase   database   = new TgimbaDatabase(EnvironmentalConfig.GetDbSetting());
            ITgimbaHttpClient httpClient = new TgimbaHttpClient();
            ITgimbaPing       ping       = new TgimbaPing("https://www.tgimba.com/", httpClient, database);

            ping.PingWebSite();
        }
Exemple #3
0
 protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
 {
     if (!optionsBuilder.IsConfigured)
     {
         if (useTestDatabase)
         {
             optionsBuilder.UseNpgsql(EnvironmentalConfig.GetDbSetting(true));
         }
         else
         {
             optionsBuilder.UseNpgsql(EnvironmentalConfig.GetDbSetting());
         }
     }
 }