コード例 #1
0
 public WatchController(IWatchService watchService, IImageService imageService, IOrderService orderService, IRequestContext requestContext)
 {
     _watchService = watchService;
     _imageService = imageService;
     _orderService = orderService;
     _requestContext = requestContext;
 }
コード例 #2
0
        private void begin(Object source, EventArgs e)
        {
            IWatchService iWatch = ServiceFactory.WatchService;

            iWatch.Start();
            ((HttpApplication)source).Context.Items.Add(Constants.WatchItemName, iWatch);
        }
コード例 #3
0
 public SendAlert(IWatchService watchService, IAlarmService alarmService, IMachineService machineService, IAlarmLogService alarmLogService, INotificationHubConnectionSettings hub)
 {
     _hub             = hub.Hub;
     _watchService    = watchService;
     _alarmService    = alarmService;
     _machineService  = machineService;
     _alarmLogService = alarmLogService;
 }
コード例 #4
0
        public WatchController(IWatchService watchService)
        {
            if (watchService == null)
            {
                throw new ArgumentNullException("watchService");
            }

            _watchService = watchService;
        }
コード例 #5
0
ファイル: Form1.cs プロジェクト: bwosh/csharpqa
        public Form1()
        {
            InitializeComponent();
            picScreen.Image = new Bitmap(WIDTH, HEIGHT);
            _screen         = new Screen(picScreen);
            _logger         = new Logger(txtLog);
            _watchService   = new WatchService(_logger, _screen, WIDTH, HEIGHT);

            DemoCode();
        }
コード例 #6
0
        private void end(Object source, EventArgs e)
        {
            var           app    = (HttpApplication)source;
            IWatchService iWatch = (IWatchService)app.Context.Items[Constants.WatchItemName];

            if (iWatch != null)
            {
                var requestUrl = app.Context.Request.Path;


                iWatch.Stop(requestUrl);
            }
        }
コード例 #7
0
ファイル: ActionFilter.cs プロジェクト: Kaizen-Code/Trace
        //public override void OnActionExecuting(ActionExecutingContext filterContext)
        //{
        //    base.OnActionExecuting(filterContext);
        //}

        //public override void OnActionExecuted(ActionExecutedContext filterContext)
        //{
        //    base.OnActionExecuted(filterContext);
        //}


        public void OnActionExecuting(ActionExecutingContext filterContext)
        {
            if (filterContext.IsChildAction)
            {
                return;
            }
            if (_disabledWatch)
            {
                return;
            }
            IWatchService iWatch = ServiceFactory.WatchService;

            iWatch.Start();
            filterContext.HttpContext.Items.Add(Constants.WatchItemName, iWatch);
        }
コード例 #8
0
ファイル: Handler.cs プロジェクト: Kaizen-Code/Trace
        public void ProcessRequest(HttpContext context)
        {
            //write your handler implementation here.
            var req      = context.Request;
            var response = context.Response;

            using (HtmlTextWriter writer = new HtmlTextWriter(response.Output))
            {
                writer.Write("<!DOCTYPE html>");
                writer.Write("<html>");
                writer.Write("<head>");
                writer.Write("<meta charset=\"utf - 8\" /><meta name=\"viewport\" content=\"width = device - width, initial - scale = 1.0\">");
                writer.Write("<title>Kaizen Trace Report</title>");
                writer.Write("</head>");
                writer.Write("<body>");
                if (ApplicationStartCode.DisableKaizenMvcTrace)
                {
                    writer.Write("<h2>Kaizen Mvc Trace is disabled. Please contact administrator..</h2>");
                }
                else
                {
                    iWatch = ServiceFactory.WatchService;
                    ReportType reportType;
                    if (!Enum.TryParse <ReportType>(req.QueryString["reportType"], out reportType) || !Enum.IsDefined(typeof(ReportType), reportType))
                    {
                        reportType = ReportType.Milliseconds; // default reportType
                    }
                    this.GenerateHtmlTabularReport(writer, reportType);
                }
                writer.Write("</body>");
                writer.Write("</html>");
            }
            response.End();
            //if(req.HttpMethod.ToUpper() == "POST")
            //{
            //    var status = req["status"];
            //    if (status != null)
            //    {
            //        ActionFilter.IsDisabled = status == "enabled" ? false : true;
            //    }
            //    response.Redirect(req.Path);
            //}
        }
コード例 #9
0
 public CartController(IWatchService watchService, IOrderService orderService, IUserService userService)
 {
     _watchService = watchService;
     _orderService = orderService;
     _userService = userService;
 }
コード例 #10
0
 public OrderService(IOrderRepository orderRepository, IOrderWatchRepository orderWatchRepository, IWatchService watchService)
 {
     _orderRepository = orderRepository;
     _orderWatchRepository = orderWatchRepository;
     _watchService = watchService;
 }
コード例 #11
0
 public NotificationsController(IWatchService watchService)
 {
     watch = watchService;
 }
コード例 #12
0
 public SyncService(IWatchService watchService)
 {
     _watchService = watchService;
 }
コード例 #13
0
 public AnotherCart(IWatchService watchService)
 {
     _watchService = watchService;
 }
コード例 #14
0
 public AdminController(IWatchService watchService, IImageService imageService, IOrderService orderService)
 {
     _watchService = watchService;
     _imageService = imageService;
     _orderService = orderService;
 }
コード例 #15
0
 public NavController(IWatchService watchService, IAccountService accountService)
 {
     _watchService = watchService;
     _accountService = accountService;
 }
コード例 #16
0
 public IndexModel(ILogger <IndexModel> logger, IWatchService watchService)
 {
     _logger       = logger;
     _watchService = watchService;
 }
コード例 #17
0
 public SubscribeToMachine(IWatchService watchService, IMachineService machineService)
 {
     _watchservice   = watchService;
     _machineService = machineService;
 }
コード例 #18
0
 public GetAlarmSubscriptions(IWatchService watchService)
 {
     _watchService = watchService;
 }
コード例 #19
0
 public DeleteMachineSubscription(IWatchService watchService)
 {
     _watchService = watchService;
 }
コード例 #20
0
 public WatchControllerBuilder()
 {
     _watchService = new Mock <IWatchService>().Object;
 }
コード例 #21
0
 public WatchControllerBuilder WithWatchService(IWatchService watchService)
 {
     _watchService = watchService;
     return(this);
 }
コード例 #22
0
 public WatchController(IWatchService watchService, IMapper mapper)
 {
     _watchService = watchService;
     _mapper       = mapper;
 }
コード例 #23
0
 public SubscribeToAlarm(IWatchService watchService, IAlarmService alarmService)
 {
     _watchservice = watchService;
     _alarmservice = alarmService;
 }
コード例 #24
0
 public WatchCartApp(IWatchService watchService, IOrderRepository repository)
 {
     this._watchService = watchService;
     this._repository   = repository;
 }
コード例 #25
0
 public DeleteAlarmSubscription(IWatchService watchService)
 {
     _watchService = watchService;
 }
コード例 #26
0
 public GetMachineSubscriptions(IWatchService watchService)
 {
     _watchService = watchService;
 }