コード例 #1
0
        /// <summary>
        /// Returns a value which is indicating if the webservice is available or not
        /// </summary>
        /// <returns></returns>
        public bool IsWebserviceAvailable()
        {
            bool result = false;
            int retryCount = 0;

            PixelService.Application app = new PixelService.Application();
            PixelService.testService test = new PixelService.testService();

            test.message = "test";

            do
            {

                try
                {
                    Logger.LogInfo("Try: " + retryCount);
                    app.testService(test);
                    result = true;
                }
                catch(Exception ex)
                {
                    Logger.LogError("Error while checking if webservice is available", ex);
                    result = false;
                    System.Threading.Thread.Sleep(1000);
                }
                retryCount++;

            } while (!(result == true));

            return result;
        }
コード例 #2
0
ファイル: Reference.cs プロジェクト: Urmel11/wordclockPI
 /// <remarks/>
 public void testServiceAsync(testService testService1, object userState) {
     if ((this.testServiceOperationCompleted == null)) {
         this.testServiceOperationCompleted = new System.Threading.SendOrPostCallback(this.OntestServiceOperationCompleted);
     }
     this.InvokeAsync("testService", new object[] {
                 testService1}, this.testServiceOperationCompleted, userState);
 }
コード例 #3
0
ファイル: Reference.cs プロジェクト: Urmel11/wordclockPI
 /// <remarks/>
 public void testServiceAsync(testService testService1) {
     this.testServiceAsync(testService1, null);
 }