Ext.Net.Observable.FireAsyncEvent C# (CSharp) Method

FireAsyncEvent() private method

private FireAsyncEvent ( string eventName, System.Web.UI.WebControls.ParameterCollection extraParams ) : void
eventName string
extraParams System.Web.UI.WebControls.ParameterCollection
return void
        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);
        }