private void CheckEventBindingMethod(BindingEvent bindingEvent, MethodInfo method) { if (!IsScenarioSpecificEvent(bindingEvent) && !method.IsStatic) { throw errorProvider.GetNonStaticEventError(method); } //TODO: check parameters, etc. }
protected override bool ValidateHook(BindingSourceMethod bindingSourceMethod, BindingSourceAttribute hookAttribute, HookType hookType) { //TODO: this call will be refactored when binding error detecttion will be improved in v2 - currently implemented here for backwards compatibility if (!IsScenarioSpecificHook(hookType) && !bindingSourceMethod.IsStatic) { throw errorProvider.GetNonStaticEventError(bindingSourceMethod.BindingMethod); } return(base.ValidateHook(bindingSourceMethod, hookAttribute, hookType)); }