Example #1
0
        public static void RegisterChangeCall(Type dialPlanType, ADialPlan.sUpdateConfigurationsCall[] configurationCalls, IEvent[] triggerEvents)
        {
            Monitor.Enter(_lock);
            ArrayList changes = _Changes;

            if (changes == null)
            {
                changes = new ArrayList();
            }
            bool add = true;
            RegisteredConfigurationRegenerationCall call = new RegisteredConfigurationRegenerationCall(dialPlanType, configurationCalls, triggerEvents);

            foreach (object obj in changes)
            {
                if (obj is RegisteredConfigurationRegenerationCall)
                {
                    if (call.Equals(obj))
                    {
                        add = false;
                        break;
                    }
                }
            }
            if (add)
            {
                changes.Add(call);
            }
            _Changes = changes;
            Monitor.Exit(_lock);
        }
 public static void RegisterChangeCall(Type dialPlanType, ADialPlan.sUpdateConfigurationsCall[] configurationCalls, IEvent[] triggerEvents)
 {
     Monitor.Enter(_lock);
     ArrayList changes = _Changes;
     if (changes == null)
         changes = new ArrayList();
     bool add = true;
     RegisteredConfigurationRegenerationCall call = new RegisteredConfigurationRegenerationCall(dialPlanType, configurationCalls, triggerEvents);
     foreach (object obj in changes)
     {
         if (obj is RegisteredConfigurationRegenerationCall)
         {
             if (call.Equals(obj))
             {
                 add = false;
                 break;
             }
         }
     }
     if (add)
         changes.Add(call);
     _Changes = changes;
     Monitor.Exit(_lock);
 }