public CorEvalEventArgs(CorAppDomain appDomain, CorThread thread,
                         CorEval eval, ManagedCallbackType callbackType)
     : base(appDomain, thread, callbackType)
 {
     m_eval = eval;
 }
Exemple #2
0
 /// <summary>
 /// Register a Custom Eval.
 /// </summary>
 /// <param name="eval">The CorEval to register.</param>
 /// <param name="handler">The CustomEvalEventHandler to use.</param>
 public void RegisterCustomEval(CorEval eval, CustomEvalEventHandler handler)
 {
     Debug.Assert(eval != null);
     if (eval == null)
         throw new ArgumentException("cannot be null", "eval");
     if (handler == null)
     {
         // explicit deregistration
         if (customEvals != null)
             customEvals.Remove(eval);
     }
     else
     {
         // adding registration
         if (customEvals == null)
             customEvals = new ListDictionary();
         else if (customEvals.Contains(eval))
             throw new InvalidOperationException("Handler alrady registered for the custom eval");
         customEvals.Add(eval, handler);
     }
 }
 public CorEvalEventArgs(CorAppDomain appDomain, CorThread thread,
                         CorEval eval)
     : base(appDomain, thread)
 {
     m_eval = eval;
 }