Ejemplo n.º 1
0
        /// <summary>
        /// 執行
        /// </summary>
        public void Execute()
        {
            _license.Verify(DateTime.Now);

            _workDirector.Execute();

            _notificationDirector.Execute();

            _pusher.Execute();
        }
Ejemplo n.º 2
0
        public IHttpActionResult Post(Repair repair)
        {
            var name   = "Repair";
            var logger = NLog.LogManager.GetLogger(name);

            try
            {
                var license = new LicenseBusinessLogic();
                license.Verify(DateTime.Now);

                var output = Save(repair);

                GenericPushStrategy pusher = new RepairPushStrategy(output);
                pusher.Execute();

                return(Ok());
            }
            catch (Exception ex)
            {
                logger.Error(ex);
                return(Content(HttpStatusCode.InternalServerError, ex));
            }
        }