private GetEventService ( object component ) : IEventBindingService | ||
component | object | |
return | IEventBindingService |
private IEventBindingService GetEventService(object component)
{
IComponent comp = component as IComponent;
if (comp == null || comp.Site == null)
throw new Exception ("Check whether a tab can display a component before displaying it");
IEventBindingService evtBind = (IEventBindingService) comp.Site.GetService (typeof (IEventBindingService));
if (evtBind == null)
throw new Exception ("Check whether a tab can display a component before displaying it");
return evtBind;
}