public void ThreadMonitorServiceBus(object data) { tc.InstrumentationKey = "7972aa41-5375-4134-8a9a-4ddf53a78f80";// "a22ec41f -0ffa-4bd8-a745-d982cf9c1268"; tc.Context.User.Id = Environment.UserName; tc.Context.Session.Id = Guid.NewGuid().ToString(); tc.Context.Device.OperatingSystem = Environment.OSVersion.ToString(); tc.TrackEvent("ServiceBusWatcher"); namespaceManager = Microsoft.ServiceBus.NamespaceManager.CreateFromConnectionString(connectionString); serviceBusHelper = new ServiceBusHelper(); serviceBusHelper.OnCreate += serviceBusHelper_OnCreate; serviceBusHelper.OnDelete += serviceBusHelper_OnDelete; var serviceBusNamespace = GetServiceBusNamespace("Manual", connectionString); bool bFlag = serviceBusHelper.Connect(serviceBusNamespace); for (int iIndex = 0; iIndex < 6000; iIndex++) { tc.TrackEvent("GetEntities: " + (iIndex + 1)); GetEntities(EntityType.All); System.Threading.Thread.Sleep(500); } Console.WriteLine("*******************"); Console.WriteLine("* Report Complete *"); Console.WriteLine("*******************"); }
public void ThreadMonitorServiceBus(/*object data*/) { tc.InstrumentationKey = "448255fe-beb0-44d9-a019-7a7353a3f39f";// "7972aa41-5375-4134-8a9a-4ddf53a78f80";// Ap6R7CCAr9qz7nQP6G0DqWUclkDMGI6oA/m+eSKTJqw="; tc.Context.User.Id = Environment.UserName; tc.Context.Session.Id = Guid.NewGuid().ToString(); tc.Context.Device.OperatingSystem = Environment.OSVersion.ToString(); tc.TrackEvent("ServiceBusWatcher"); namespaceManager = Microsoft.ServiceBus.NamespaceManager.CreateFromConnectionString(connectionString); serviceBusHelper = new ServiceBusHelper(); //serviceBusHelper.OnCreate += serviceBusHelper_OnCreate; //serviceBusHelper.OnDelete += serviceBusHelper_OnDelete; var serviceBusNamespace = serviceBusHelper.GetServiceBusNamespace("Manual", connectionString); bool bFlag = serviceBusHelper.Connect(serviceBusNamespace); tc.TrackEvent("GetEntities"); iGlobalVMRes = GetEntities(); Console.WriteLine("*******************"); Console.WriteLine("* Report Complete *"); Console.WriteLine("*******************"); }