Esempio n. 1
0
 public override void transition <T1>(ServiceController <T1> controller, ServiceController.Transition transition) where T1 : S
 {
     if (transition.After.Equals(ServiceController.Substate.UP))
     {
         serviceAvailable();
         lock (this)
         {
             Monitor.PulseAll(this);
         }
     }
     else if (transition.After.Equals(ServiceController.Substate.CANCELLED))
     {
         lock (this)
         {
             cancelled = true;
             Monitor.PulseAll(this);
         }
     }
     else if (transition.After.Equals(ServiceController.Substate.START_FAILED))
     {
         lock (this)
         {
             failed = true;
             Monitor.PulseAll(this);
         }
     }
 }
Esempio n. 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings({ "rawtypes", "unchecked" }) public void transition(org.jboss.msc.service.ServiceController controller, org.jboss.msc.service.ServiceController.Transition transition)
        public virtual void transition(ServiceController controller, ServiceController.Transition transition)
        {
            if (!typeToTrack.isParentOf(controller.Name))
            {
                return;
            }

            if (transition.After.State.Equals(ServiceController.State.UP))
            {
                serviceCollection.Add((S)controller.Value);
            }
            else
            {
                serviceCollection.remove(controller.Value);
            }
        }