/// <summary> /// <see cref="ModuleHost"/> implements <see cref="IEventHandler"/> and exposes its methods so that a <see cref="IModule"/> /// instance can check to see if an <see cref="IEvent"/> instance can be handled and pass it to <see cref="ModuleHost.Handle(IEvent)"/> /// for handling. It is recommended to always use <see cref="IModuleHost"/> to handle events rather than invoking /// <see cref="Module.Handle(IEvent)"/> directly. Invoking <see cref="Module.Handle(IEvent)"/> will create a ghost event /// which will bee invisible to the <see cref="IModuleHost"/> and all other modules. /// </summary> public virtual bool CanHandle(IEvent e) { if (_ModuleCollection != null) { return(_ModuleCollection.CanHandle(e)); } return(false); }
/// <summary> /// <see cref="ModuleHost"/> implements <see cref="IEventHandler"/> and exposes its methods so that a <see cref="IModule"/> /// instance can check to see if an <see cref="IEvent"/> instance can be handled and pass it to <see cref="ModuleHost.Handle(IEvent)"/> /// for handling. It is recommended to always use <see cref="IModuleHost"/> to handle events rather than invoking /// <see cref="Module.Handle(IEvent)"/> directly. Invoking <see cref="Module.Handle(IEvent)"/> will create a ghost event /// which will bee invisible to the <see cref="IModuleHost"/> and all other modules. /// </summary> public virtual bool CanHandle(IEvent e) { return(_ModuleCollection.CanHandle(e)); }