public model.WebSvc Work() { DateTime startTime = DateTime.Now; base.Log.Info("Start: " + _webSvcPath); List <ServiceDescription> descriptions; List <XmlSchema> schemas; bool descriptionsFound = _downloader.Download(base.Proxy, out descriptions, out schemas); if (!descriptionsFound) { throw new SvcDescsNotFoundException(); } return(_parser.Generate(_webSvcPath, descriptions, schemas)); }
protected override void Work() { DateTime startTime = DateTime.Now; base.Log.Info("Start: " + _webSvcPath); List <ServiceDescription> descriptions; List <XmlSchema> schemas; bool descriptionsFound = _downloader.Download(base.Proxy, out descriptions, out schemas); if (base.HasTimedOut) { return; } if (!descriptionsFound) { throw new SvcDescsNotFoundException(); } var webSvc = _parser.Generate(_webSvcPath, descriptions, schemas); if (base.HasTimedOut) { return; } //success if (OnComplete != null) { DateTime endTime = DateTime.Now; OnComplete(this, new process.WebSvcAsync.EventParams.AsyncArgsCompleteRetrieve(_webSvcPath, startTime, endTime, new process.WebSvcAsync.Result.RetrieveAsyncResult(webSvc) )); } }