Exemple #1
0
        private void WebClient_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
        {
            try
            {
                DataContractJsonSerializer dcjs        = new DataContractJsonSerializer(typeof(DataExtractionServiceInfo));
                DataExtractionServiceInfo  serviceInfo = dcjs.ReadObject(e.Result) as DataExtractionServiceInfo;
                e.Result.Close();
                e.Result.Dispose();

                if (InfoReady != null)
                {
                    serviceInfo.IsReady = true;
                    InfoReady(this, new GPServiceInfoEventArgs(serviceInfo));
                }
            }
            catch (Exception ex)
            {
                if (InfoReady != null)
                {
                    InfoReady(this, new GPServiceInfoEventArgs(ex.Message));
                }
            }
        }
Exemple #2
0
 public GPServiceInfoEventArgs(DataExtractionServiceInfo serviceInfo)
 {
     this._serviceInfo = serviceInfo;
 }