protected virtual void OnRequesExecuting(RequesExecutingEventArgs e) { if (RequesExecuting != null) { RequesExecuting(this, e); } ; }
private void Execute(IRequest request) { var eventArgs = new RequesExecutingEventArgs() { Request = request, State = RequesExecutingEventArgs.EStatus.Executing, Message = String.Empty }; OnRequesExecuting(eventArgs); try { request.Execute(); eventArgs.State = RequesExecutingEventArgs.EStatus.Comleted; } catch (Exception e) { eventArgs.State = RequesExecutingEventArgs.EStatus.Failed; eventArgs.Message = e.Message; }; }