Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:System.Web.HttpApplication"/> class.
        /// </summary>
        public DexterApplication()
        {
            this.logger = LogManager.GetCurrentClassLogger();

            DexterContainer.StartUp();
            this.container      = DexterContainer.Resolve <IDexterContainer>();
            this.dexterCall     = DexterContainer.Resolve <IDexterCall>();
            this.routingService = DexterContainer.Resolve <IRoutingService>();
            this.taskExecutor   = DexterContainer.Resolve <ITaskExecutor>();
            this.pluginService  = DexterContainer.Resolve <IPluginService>();
            this.pluginService.LoadAllEnabledPlugins();

            base.BeginRequest += (o, args) => this.BeginRequest();
            base.EndRequest   += (o, args) => this.EndRequest();
            this.Init();
        }
Пример #2
0
        private static Action CreateNewAction(Action call)
        {
            return(delegate
            {
                IDexterCall dexterCall = DexterContainer.Resolve <IDexterCall>();

                dexterCall.StartSession();

                try
                {
                    call.Invoke();
                    dexterCall.Complete(true);
                }
                catch
                {
                    dexterCall.Complete(false);
                    throw;
                }
            });
        }
Пример #3
0
        private static Func <T> CreateNewFunc <T>(Func <T> call)
        {
            return(delegate
            {
                IDexterCall dexterCall = DexterContainer.Resolve <IDexterCall>();

                dexterCall.StartSession();

                try
                {
                    T returnObject = call.Invoke();
                    dexterCall.Complete(true);

                    return returnObject;
                }
                catch
                {
                    dexterCall.Complete(false);
                    throw;
                }
            });
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="JobExecutionExceptionListener"/> class.
 /// </summary>
 /// <param name="bmwCall">The BMW call.</param>
 /// <param name="logger">The logger.</param>
 public JobExecutionExceptionListener(IDexterCall bmwCall, ILog logger)
 {
     this.bmwCall = bmwCall;
     this.logger = logger;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="JobExecutionExceptionListener"/> class.
 /// </summary>
 /// <param name="bmwCall">The BMW call.</param>
 /// <param name="logger">The logger.</param>
 public JobExecutionExceptionListener(IDexterCall bmwCall, ILog logger)
 {
     this.bmwCall = bmwCall;
     this.logger  = logger;
 }