private void CacheRefreshCallBack(WeatherBot state) { foreach (var location in _locations) { var ws = new GlobalWeatherService.GlobalWeatherSoapClient(); ws.BeginGetWeather(Interpreter.Find <ATCreate, ACName>(location.VpObject.Action).Name.Replace("ws-", ""), string.Empty, WeatherCacheCallback, new object[] { ws, location.VpObject }); } }
void Instance_EventQueryCellResult(IInstance sender, VpObject objectData) { var result = Interpreter.Find <ATCreate, ACName>(objectData.Action); if (result != null && result.Name.StartsWith("ws-")) { //_locations.Add(objectData); var ws = new GlobalWeatherService.GlobalWeatherSoapClient(); ws.BeginGetWeather(Interpreter.Find <ATCreate, ACName>(objectData.Action).Name.Replace("ws-", ""), string.Empty, WeatherCacheCallback, new object[] { ws, objectData }); } else if (result != null && result.Name == "display-ws") { _display = objectData; } }