Fan.Sys.Service_.stop C# (CSharp) Méthode

stop() public static méthode

public static stop ( Service self ) : Service
self Service
Résultat Service
        public static Service stop(Service self)
        {
            try
              {
            lock (m_lock)
            {
              // if not running, short circuit
              State state = (State)byService[self];
              if (state == null || !state.running) return self;

              // take out of the running state
              state.running = false;
            }

            // onStop (outside of lock)
            self.onStop();
              }
              catch (System.Exception e)
              {
            Err.dumpStack(e);
              }
              return self;
        }