Ejemplo n.º 1
0
        ///  <summary>
        ///  Creates a new instance of the Invoker Class, which is used to Invoke methods across threads.
        ///  </summary>
        ///  <param name="threadSafety">A pre-configured ThreadSafetyEnforcer.</param>
        ///  <exception cref="ArgumentNullException">threadSafety is null</exception>
        ///  <exception cref="ArgumentNullException">threadSafety is null</exception>
        public Invoker(ThreadSafetyEnforcer threadSafety)
        {
            if (threadSafety == null)
            {
                throw new ArgumentNullException();
            }
            if (!threadSafety.EnforcingThreadSafety)
            {
                throw new ArgumentException("Invoker requires an enforcing Enforcer object.");
            }

            _threadSafety = threadSafety;
            _invokeList   = new Queue <InvokeItem>();
        }
Ejemplo n.º 2
0
 ///  <summary>
 ///  Creates a new instance of the Invoker Class, which is used to Invoke methods across threads.  Thready Safety is enforced.
 ///  </summary>
 public Invoker()
 {
     _threadSafety = new ThreadSafetyEnforcer("Generic-StormLib.Threading.Invoker");
     _invokeList   = new Queue <InvokeItem>();
 }
Ejemplo n.º 3
0
 ///  <summary>
 ///  Creates a new instance of the Invoker Class, which is used to Invoke methods across threads. Thready Safety is enforced.
 ///  </summary>
 ///  <param name="Identifier">An Identifier for Exception calls.</param>
 public Invoker(String Identifier)
 {
     _threadSafety = new ThreadSafetyEnforcer(Identifier, true);
     _invokeList   = new Queue <InvokeItem>();
 }