Esempio n. 1
0
 protected virtual void OnRequesExecuting(RequesExecutingEventArgs e)
 {
     if (RequesExecuting != null)
     {
         RequesExecuting(this, e);
     }
     ;
 }
Esempio n. 2
0
        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;
            };
        }