Пример #1
0
        private void ShutdownReverseLookup(AsyncTask task, object state)
        {
            ReverseNumberLookup rnl = m_reverseNumberLookup;

            if (rnl == null)
            {
                task.Complete(null);
                return;
            }
            task.DoOneStep(
                delegate()
            {
                this.Logger.Log(Logger.LogLevel.Info, "Shuttong down Reverse Number Lookup.");
                rnl.BeginShutdown(
                    delegate(IAsyncResult ar)
                {
                    task.DoFinalStep(
                        delegate()
                    {
                        rnl.EndShutdown(ar);
                        this.Logger.Log(Logger.LogLevel.Info, "Reverse Number Lookup shutdown.");
                    });
                },
                    null);
            });
        }
Пример #2
0
 private void StartupReverseLookup(AsyncTask task, object state)
 {
     task.DoOneStep(
         delegate()
     {
         m_reverseNumberLookup = ReverseNumberLookup.GetLookupInstance(this);
         //this.Logger.Log(Logger.LogLevel.Info, "Starting Reverse Number Lookup");
         m_reverseNumberLookup.BeginStartup(
             delegate(IAsyncResult ar)
         {
             task.DoFinalStep(
                 delegate()
             {
                 m_reverseNumberLookup.EndStartup(ar);
                 //this.Logger.Log(Logger.LogLevel.Info, "Reverse Number Lookup started");
             });
         },
             null);
     });
 }