internal void FireAsyncEvent(string eventName, ParameterCollection extraParams)
{
ComponentDirectEvents directevents = this.GetDirectEvents();
if (directevents == null)
{
throw new HttpException("The control has no DirectEvents");
}
PropertyInfo eventListenerInfo = directevents.GetType().GetProperty(eventName);
if (eventListenerInfo.PropertyType != typeof(ComponentDirectEvent))
{
throw new HttpException("The control '{1}' does not have an DirectEvent with the name '{0}'".FormatWith(eventName, this.ClientID));
}
ComponentDirectEvent directevent = eventListenerInfo.GetValue(directevents, null) as ComponentDirectEvent;
if (directevent == null || directevent.IsDefault)
{
throw new HttpException("The control '{1}' does not have an DirectEvent with the name '{0}' or the handler is absent".FormatWith(eventName, this.ClientID));
}
DirectEventArgs e = new DirectEventArgs(extraParams);
directevent.Owner = this;
directevent.OnEvent(e);
}