public double GetCurrentLoad() { Console.WriteLine("\n"); Console.WriteLine("Service Bus Monitor Starting......"); Console.WriteLine("\n"); try { ServiceBusWatcher w = new ServiceBusWatcher(); Thread newThread = new Thread(w.ThreadMonitorServiceBus); newThread.Start("The answer."); System.Threading.Thread.Sleep(10000000); notificationHubNamespaceManager = Microsoft.Azure.NotificationHubs.NamespaceManager.CreateFromConnectionString(connectionString); if (notificationHubNamespaceManager != null) { GetQMessageCount(); } return(5); } catch (Exception) { return(-1); } }
public double GetCurrentLoad() { Console.WriteLine("\n"); Console.WriteLine("Service Bus Monitor Starting......"); try { ServiceBusWatcher w = new ServiceBusWatcher(); ThreadMonitorServiceBus(); return(iGlobalVMRes); } catch (Exception) { return(0); } }