Exemple #1
0
        private static void start()
        {
            try
            {
                s_Instance.Start();
            }
            catch (Exception error)
            {
                s_Instance = null;

                log(MessageType.CatastrophicError,
                    "Instance.get(){svc.start()}",
                    error.ToMessageWithType(), error);
            }
        }
Exemple #2
0
 private static void start()
 {
     try
     {
         s_Instance.Start();
     }
     catch (Exception error)
     {
         s_Instance = null;
         var msg = new Message
         {
             Type      = MessageType.CatastrophicError,
             Topic     = StringConsts.WEB_LOG_TOPIC,
             From      = typeof(GeoLookupService).FullName + ".Instance.get(){svc.start()}",
             Text      = error.ToMessageWithType(),
             Exception = error
         };
         App.Log.Write(msg);
     }
 }
Exemple #3
0
      private static void start()
      {
        try 
        {
          s_Instance.Start();
        }
        catch(Exception error)
        {
          s_Instance = null;

          log(MessageType.CatastrophicError,
              "Instance.get(){svc.start()}",
              error.ToMessageWithType(), error); 
        }
      }
Exemple #4
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() );
              }
        }
Exemple #5
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;
        }
Exemple #6
0
 private static void start()
 {
   try 
   {
     s_Instance.Start();
   }
   catch(Exception error)
   {
     s_Instance = null;
     var msg = new Message
     {
       Type = MessageType.CatastrophicError,
       Topic = StringConsts.WEB_LOG_TOPIC,
       From = typeof(GeoLookupService).FullName+".Instance.get(){svc.start()}",
       Text = error.ToMessageWithType(),
       Exception = error
     };
     App.Log.Write( msg ); 
   }
 }