Пример #1
0
        /// <summary>
        /// Aggiunge Item
        /// </summary>
        /// <param name="handler"></param>
        /// <param name="input"></param>
        /// <param name="output"></param>
        internal void Add(BusinessSlot.EObjectEvent evt, Type t, BusinessSlot.BDEventPreHandler handler)
        {
            SlotEventForTypeQueuePRE q = null;

            if (!this.TryGetValue(evt, out q))
            {
                q = new SlotEventForTypeQueuePRE();
                this.Add(evt, q);
            }

            q.Add(t, handler);
        }
Пример #2
0
        /// <summary>
        /// Aggiunge Item
        /// </summary>
        /// <param name="handler"></param>
        /// <param name="input"></param>
        /// <param name="output"></param>
        internal void Add(Type t, BusinessSlot.BDEventPreHandler handler)
        {
            SlotEventSimpleQueuePRE q = null;
            long lKey = t.TypeHandle.Value.ToInt64();

            if (!this.TryGetValue(lKey, out q))
            {
                q             = new SlotEventSimpleQueuePRE();
                q.HandledType = t;
                this.Add(lKey, q);
            }

            q.Add(handler);
        }
Пример #3
0
 /// <summary>
 /// Registra evento per tipo su coda
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="evt"></param>
 /// <param name="func"></param>
 public void RegisterPreEventHandler <T>(BusinessSlot.EObjectEvent evt, BusinessSlot.BDEventPreHandler func)
     where T : DataObject <T>
 {
     //Aggiunge alla coda Post
     this.PreEventQ.Add(evt, typeof(T), func);
 }
Пример #4
0
 /// <summary>
 /// Registra evento per qualunque tipo
 /// </summary>
 /// <param name="evt"></param>
 /// <param name="func"></param>
 /// <param name="inputData"></param>
 /// <param name="outputData"></param>
 public void RegisterPreEventHandlerForAny(BusinessSlot.EObjectEvent evt, BusinessSlot.BDEventPreHandler func)
 {
     //Aggiunge alla coda Pre con tipo: oggetto
     this.PreEventQ.Add(evt, typeof(object), func);
 }