Example #1
0
        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;
        }
Example #2
0
        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;
        }
Example #3
0
        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());
            }
        }