Exemple #1
0
        public void Register(LeakPipelineTrigger trigger)
        {
            ManualResetEvent handle = new ManualResetEvent(false);

            WaitHandle[]          newHandles  = new WaitHandle[handles.Length + 1];
            LeakPipelineTrigger[] newTriggers = new LeakPipelineTrigger[triggers.Length + 1];

            Array.Copy(handles, newHandles, handles.Length);
            Array.Copy(triggers, newTriggers, triggers.Length);

            newHandles[handles.Length]   = handle;
            newTriggers[triggers.Length] = trigger;
            newTriggers[triggers.Length].Register(handle);

            triggers = newTriggers;
            handles  = newHandles;
        }
Exemple #2
0
 void PipelineService.Register(LeakPipelineTrigger trigger)
 {
     trigger.Register(synchronizer);
     triggers.Add(trigger);
 }