public SiteInfoResponseType GetSitesInBox( float west, float south, float east, float north, Boolean IncludeSeries ) { Stopwatch timer = System.Diagnostics.Stopwatch.StartNew(); box queryBox = new box(west, south, east, north); queryLog2.LogStart(CustomLogging.Methods.GetSitesInBoxObject, queryBox.ToString(), appContext.Request.UserHostName); SiteInfoResponseType resp = new SiteInfoResponseType(); resp.site = WebServiceUtils.GetSitesByBox(queryBox, IncludeSeries); //set query info resp.queryInfo = CuahsiBuilder.CreateQueryInfoType("GetSitesInBox"); NoteType note = CuahsiBuilder.createNote("box"); resp.queryInfo.note = CuahsiBuilder.addNote(null, note); queryLog2.LogEnd(CustomLogging.Methods.GetSitesInBoxObject, queryBox.ToString(), timer.ElapsedMilliseconds.ToString(), resp.site.Length.ToString(), appContext.Request.UserHostName); return(resp); }
public SiteInfoResponseType GetSitesInBox( float west, float south, float east, float north, Boolean IncludeSeries ) { Stopwatch timer = System.Diagnostics.Stopwatch.StartNew(); GetSiteInfoOD obj = new GetSiteInfoOD(); box queryBox = new box(west, south, east, north); queryLog2.LogStart(Logging.Methods.GetSitesInBoxObject, queryBox.ToString(), appContext.Request.UserHostName); SiteInfoResponseType resp = obj.GetSitesByBox(queryBox, IncludeSeries); queryLog2.LogEnd(Logging.Methods.GetSitesInBoxObject, queryBox.ToString(), timer.ElapsedMilliseconds.ToString(), resp.site.Length.ToString(), appContext.Request.UserHostName); return(resp); }
void GetMessagesCallback(XDocument response) { try { var ObjMessages = from x in response.Descendants("message") select new Message(x); Messages.Clear(); foreach (Message singleMessage in ObjMessages) { Messages.Add(singleMessage); } if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs("Comments")); } } catch (Exception) { MessageBox.Show("Cannot load messages of " + _box.ToString()); } }
public SiteInfoResponseType GetSitesInBox( float west, float south, float east, float north, Boolean IncludeSeries ) { Stopwatch timer = System.Diagnostics.Stopwatch.StartNew(); GetSiteInfoOD obj = new GetSiteInfoOD(); box queryBox = new box(west, south, east, north); queryLog2.LogStart(Logging.Methods.GetSitesInBoxObject, queryBox.ToString(), appContext.Request.UserHostName); SiteInfoResponseType resp = obj.GetSitesByBox(queryBox, IncludeSeries); queryLog2.LogEnd(Logging.Methods.GetSitesInBoxObject, queryBox.ToString(), timer.ElapsedMilliseconds.ToString(), resp.site.Length.ToString(), appContext.Request.UserHostName); return resp; }
public static IEnumerable<SiteInfoType> GetSitesByBox(box queryBox) { siteInfoDataSet sDS; sDS = GetSiteInfoDataSet(queryBox); if (sDS.sites.Count == 0) { throw new WaterOneFlowException("No Sites found in specified region: " + queryBox.ToString()); } else { List<SiteInfoType> sites = new List<SiteInfoType>(sDS.sites.Count); foreach (siteInfoDataSet.sitesRow s in sDS.sites) { SiteInfoType sit = row2SiteInfoElement(s, sDS); yield return sit; } } }
public static IEnumerable <SiteInfoType> GetSitesByBox(box queryBox) { siteInfoDataSet sDS; sDS = GetSiteInfoDataSet(queryBox); if (sDS.sites.Count == 0) { throw new WaterOneFlowException("No Sites found in specified region: " + queryBox.ToString()); } else { List <SiteInfoType> sites = new List <SiteInfoType>(sDS.sites.Count); foreach (siteInfoDataSet.sitesRow s in sDS.sites) { SiteInfoType sit = row2SiteInfoElement(s, sDS); yield return(sit); } } }
public SiteInfoResponseType GetSitesInBox( float west, float south, float east, float north, Boolean IncludeSeries ) { Stopwatch timer = System.Diagnostics.Stopwatch.StartNew(); box queryBox = new box(west, south, east, north); queryLog2.LogStart(CustomLogging.Methods.GetSitesInBoxObject, queryBox.ToString(), appContext.Request.UserHostName); SiteInfoResponseType resp = new SiteInfoResponseType(); resp.site = WebServiceUtils.GetSitesByBox(queryBox, IncludeSeries); //set query info resp.queryInfo = CuahsiBuilder.CreateQueryInfoType("GetSitesInBox"); NoteType note = CuahsiBuilder.createNote("box"); resp.queryInfo.note = CuahsiBuilder.addNote(null, note); queryLog2.LogEnd(CustomLogging.Methods.GetSitesInBoxObject, queryBox.ToString(), timer.ElapsedMilliseconds.ToString(), resp.site.Length.ToString(), appContext.Request.UserHostName); return resp; }