private static void MainSvcThread() { try { DNScymbalSettings configSettings = DNScymbalSettings.Load(); //SqlAzureRest sar = new SqlAzureRest(); //sar.ServerName = "rfu3pk0bka"; //sar.SubscriptionId = "9799e688-6fa7-4085-ab24-9b6d9233e2ad"; //sar.SetServerFirewallRuleWithIpDetect(); // Loop until we are stopping while (!_stopEvent.WaitOne(1000)) { foreach (RecordUpdateRequest rur in configSettings.RecordUpdateRequests) { UpdateRecordIfNeeded(rur); } } } catch (Exception ex) { HandleException(ex); } }
/// <summary> /// Loads the DNScymbal applications config settings. /// </summary> /// <returns></returns> public static DNScymbalSettings Load() { DNScymbalSettings config; if (!File.Exists(DNScymbalSettings.FullName)) { config = new DNScymbalSettings(); } else { using (FileStream fileStream = new FileStream(DNScymbalSettings.FullName, FileMode.Open, FileAccess.Read)) { config = (DNScymbalSettings)s_xmlSerializer.Deserialize(fileStream); } } // Return return(config); }
/// <summary> /// Loads the DNScymbal applications config settings. /// </summary> /// <returns></returns> public static DNScymbalSettings Load() { DNScymbalSettings config; if (!File.Exists(DNScymbalSettings.FullName)) { config = new DNScymbalSettings(); } else { using (FileStream fileStream = new FileStream(DNScymbalSettings.FullName, FileMode.Open, FileAccess.Read)) { config = (DNScymbalSettings)s_xmlSerializer.Deserialize(fileStream); } } // Return return config; }