AspNetEdit.UI.EventPropertyTab.GetEventService C# (CSharp) Méthode

GetEventService() private méthode

private GetEventService ( object component ) : IEventBindingService
component object
Résultat 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;
        }