public void HealthCheckOperations_ConstructorArg2() { MockReliableStateManager stateManager = new MockReliableStateManager(); WatchdogService svc = new WatchdogService(this.context, new InitializationCallbackAdapter()); new HealthCheckOperations(svc, null, TimeSpan.FromSeconds(30), CancellationToken.None); }
protected async Task DeployWatchdogsAsync() { string transactionHash = await WatchdogService.DeployContractAsync( Web3, AddressFrom, new string[] { AddressFrom }, new BigInteger(1), new HexBigInteger(3905820)); TransactionReceipt receipt = await Web3.Eth.Transactions.GetTransactionReceipt. SendRequestAsync(transactionHash); Watchdogs = new WatchdogService(Web3, receipt.ContractAddress); }
private async Task DeployWatchdogsAsync() { string transactionHash = await WatchdogService.DeployContractAsync( Web3, AddressFrom, new string[] { AddressFrom, AddressFrom2 }, new BigInteger(2), new HexBigInteger(3905820)); Assert.NotNull(transactionHash); TransactionReceipt receipt = await Web3.Eth.Transactions.GetTransactionReceipt. SendRequestAsync(transactionHash); Watchdogs = new WatchdogService(Web3, receipt.ContractAddress); transactionHash = await IDController.SetWatchDogsAsync(AddressFrom, Watchdogs.GetAddress(), new HexBigInteger(3905820)); Assert.NotNull(transactionHash); }
public MainWindow() { try { InitializeComponent(); SetProcessPriority(); ni = new System.Windows.Forms.NotifyIcon(); ni.Icon = RMS.Agent.Watchdog.Properties.Resources.icon_16; ni.Visible = true; ni.DoubleClick += delegate(object sender, EventArgs args) { this.Show(); this.WindowState = WindowState.Normal; }; ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true; lblAppStatus.Content = "Stopped"; btnStart.IsEnabled = true; btnStop.IsEnabled = false; lblExecPath.Content = Assembly.GetExecutingAssembly().Location; ws = new WatchdogService(); dispatcherTimer = new System.Windows.Threading.DispatcherTimer(); dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick); dispatcherTimer.Interval = new TimeSpan(0, 0, 3); #region Auto Update Process _updateService = new UpdateService(); _updateService.EventAutoUpdateResult += AddAutoUpdateLog; try { txtCurrentVersion.Content = _updateService.StartAutoUpdateProcess(); } catch (Exception exception) { new RMSAppException(this, "0500", "MainWindow - StartAutoUpdateProcess failed. " + exception.Message, exception, true); } #endregion FixAppConfig(); System.Threading.Thread.Sleep(10000); btnStart_Click(null, null); try { CreateTaskScheduler(); } catch {} } catch (Exception ex) { new RMSAppException(this, "0500", "MainWindow failed. " + ex.Message, ex, true); System.Diagnostics.Process.Start(System.Windows.Application.ResourceAssembly.Location); System.Windows.Application.Current.Shutdown(); } }
/// <summary> /// HealthCheckController constructor. /// </summary> /// <param name="service">WatchdogService class instance.</param> internal HealthCheckController(WatchdogService service) { this._operations = service.HealthCheckOperations; }
/// <summary> /// HealthCheckController constructor. /// </summary> /// <param name="service">WatchdogService class instance.</param> public HealthCheckController(WatchdogService service) { this._operations = service.HealthCheckOperations; this._service = service; }
/// <summary> /// WatchdogController constructor. /// </summary><param name="service">Operations class instance.</param> internal WatchdogController(WatchdogService service) { this._service = service; }
/// <summary> /// Initializes a new instance of the <see cref="UpdateWebResources"/> class. /// </summary> public CrmWebResourcesUpdater() { AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve; watchdogService = new WatchdogService($@"{assemblyPath}\CrmWebResourceUpdater.ServiceConsole.exe", "CrmWebResourceUpdater.ServiceConsole"); watchdogService.Start(); }
/// <summary> /// WatchdogController constructor. /// </summary><param name="service">Operations class instance.</param> internal MetricsController(WatchdogService service) { this._operations = service.MetricsOperations; }