Beispiel #1
0
        public async Task <ActionResult> OnGetAsync(string start = null, string stop = null)
        {
            try
            {
                //Stop Services
                if (!string.IsNullOrWhiteSpace(stop))
                {
                    await _bitClientProcessor.StopServiceAsync();
                }
                //Start Services
                if (!string.IsNullOrWhiteSpace(start))
                {
                    await _bitClientProcessor.StartServiceAync();
                }

                this._queueStatus = this._bitClientProcessor.GetCurrentStatus();
                if (!string.IsNullOrWhiteSpace(stop) || !string.IsNullOrWhiteSpace(start))
                {
                    return(RedirectToAction(string.Empty));
                }

                return(Page());
            }
            catch (Exception ex)
            {
                return(RedirectToAction(string.Empty));
            }
        }
Beispiel #2
0
 public IndexModel(ILogger <IndexModel> logger, IBitClientProcessor bitClientProcessor)
 {
     _logger = logger;
     this._bitClientProcessor = bitClientProcessor;
     this._queueStatus        = bitClientProcessor.GetCurrentStatus();
 }