ClearCanvas.ImageServer.Services.Streaming.Shreds.ImageStreamingServer.AutoStartMe C# (CSharp) Method

AutoStartMe() private method

private AutoStartMe ( ) : void
return void
		private void AutoStartMe()
		{
			// Send a dummy request to kick start the service
			// Must be done in a thread because we are 
			// in the thread that handles incoming requests
			Task.Factory.StartNew(() =>
			                      	{
										try
										{
											using (var dummyClient = new WebClient())
											{
												foreach (var p in ServerPartitionMonitor.Instance.Partitions)
												{
													var request =
														String.Format(
															"{0}{1}?requestType=WADO&studyUID=28282&seriesUid=478844&objectUid=1231233&contentType=image%2Fjpeg&rows=100&columns=100",
															ServerEndPointUri, p.AeTitle);

													var uri = new Uri(request);
													
													// Note: this request will be rejected because the study doens't exist but we don't care 
													dummyClient.OpenRead(uri); 
													break;
												}
											}
										}
										catch(Exception e)
										{
											// ignore it
										}
										
			                      	});
			
		}
    }