protected SystemWideEventSynchronizer(SynchronousId id, string name, Predicate <object> willHandle,
                                              HandledCallback begun = null, HandledCallback ended = null, AllNotifiedCallback allNotified = null)
        {
            if (id == null)
            {
                throw new ArgumentNullException(nameof(id));
            }

            if (string.IsNullOrEmpty(name))
            {
                throw new ArgumentNullException(nameof(name));
            }

            if (willHandle == null)
            {
                throw new ArgumentNullException(nameof(willHandle));
            }

            Id            = id;
            WaitHandle    = new EventWaitHandle(false, EventResetMode.ManualReset, name);
            WillHandle    = willHandle;
            m_begun       = begun;
            m_ended       = ended;
            m_allNotified = allNotified;
        }
Exemple #2
0
        protected EventSynchronizer(SynchronousId id, Predicate <object> willHandle,
                                    HandledCallback begun = null, HandledCallback ended = null, AllNotifiedCallback allNotified = null)
        {
            if (id == null)
            {
                throw new ArgumentNullException(nameof(id));
            }

            if (willHandle == null)
            {
                throw new ArgumentNullException(nameof(willHandle));
            }

            Id            = id;
            WillHandle    = willHandle;
            m_begun       = begun;
            m_ended       = ended;
            m_allNotified = allNotified;
        }
 protected override SystemWideEventSynchronizer GetSystemWideEventSynchronizer(SynchronousId id, string name, Predicate <object> willHandle,
                                                                               HandledCallback begun = null, HandledCallback ended = null, AllNotifiedCallback allNotified = null)
 {
     return(new SystemWideEventSetter(id, name, willHandle, begun, ended, allNotified));
 }
 protected abstract SystemWideEventSynchronizer GetSystemWideEventSynchronizer(SynchronousId id, string name, Predicate <object> willHandle,
                                                                               HandledCallback begun = null, HandledCallback ended = null, AllNotifiedCallback allNotified = null);
Exemple #5
0
 protected override EventSynchronizer GetEventSynchronizer(SynchronousId id, Predicate <object> willHandle,
                                                           HandledCallback begun = null, HandledCallback ended = null, AllNotifiedCallback allNotified = null)
 {
     return(new EventWaiter(id, willHandle, begun, ended, allNotified));
 }
Exemple #6
0
 public EventWaiter(SynchronousId id, Predicate <object> willHandle,
                    HandledCallback begun = null, HandledCallback ended = null, AllNotifiedCallback allNotified = null) :
     base(id, willHandle, begun, ended, allNotified)
 {
 }
 public SystemWideEventSetter(SynchronousId id, string name, Predicate <object> willHandle,
                              HandledCallback begun = null, HandledCallback ended = null, AllNotifiedCallback allNotified = null) :
     base(id, name, willHandle, begun, ended, allNotified)
 {
 }