public void SetUp() { var config = LACONF.AsLaconicConfig(handling: ConvertErrorHandling.Throw); m_App = new ServiceBaseApplication(null, config); var service = new GeoLookupService(); service.Configure(config["geo-lookup"]); service.Start(); Service = service; }
void IRunnableHook.Prologue(Runner runner, FID id) { var config = LACONF.AsLaconicConfig(handling: ConvertErrorHandling.Throw); m_App = new ServiceBaseApplication(null, config); var service = new GeoLookupService(); service.Configure(config["geo-lookup"]); service.Start(); Service = service; }
private void button4_Click(object sender, EventArgs e) { if (m_GeoService == null) { var svc = new GeoLookupService(); svc.DataPath = @"d:\geodata"; svc.Resolution = LookupResolution.City; svc.Start(); m_GeoService = svc; } var result = m_GeoService.Lookup(IPAddress.Parse(tbIP.Text)); if (result != null) { MessageBox.Show(result.ToString()); } }