示例#1
0
 protected void AddEventInvoker(ITisEventInvoker oEventInvoker)
 {
     if (!m_oEventInvokers.ContainsKey(TypeName))
     {
         m_oEventInvokers.Add(TypeName, oEventInvoker);
     }
 }
示例#2
0
        public override ITisEventInvoker GetEventsInvoker()
        {
            ITisEventInvoker oEventInvoker =
                base.GetEventsInvoker();

            if (oEventInvoker == null)
            {
                oEventInvoker = new TisDNEventInvoker(
                    m_oAsseblyResolver.CustomizationDir,
                    ((TisDNInvokeTypeMiscellaneous)m_oMiscellaneous).Debuggers,
                    m_oAsseblyResolver);

                AddEventInvoker(oEventInvoker);
            }

            return(oEventInvoker);
        }
        public object FireEvent(object oEventSource, ITisEventParams oEventParams, ref object[] InOutParams)
        {
            if (oEventParams != null && !DisableEvents)
            {
                ITisInvokeParams oInvokeParams;

                ITisEventInvoker oEventInvoker =
                    GetEventsInvoker(oEventSource, oEventParams.Name, out oInvokeParams);

                if (oEventInvoker != null)
                {
                    return(oEventInvoker.Invoke(oInvokeParams, oEventParams, ref InOutParams));
                }
            }
            else
            {
                if (DisableEvents)
                {
                    Log.WriteWarning("Events are disabled.");
                }
            }

            return(null);
        }