/// <summary> /// Initializes a new instance of the <see cref="SYMO823MController"/> class. /// </summary> /// <param name="symo823m">The SYMO823M instance.</param> /// <param name="options">The application options.</param> /// <param name="logger">The application logger.</param> public SYMO823MController(ISYMO823M symo823m, IOptions <AppSettings> options, ILogger <SYMO823MController> logger) : base(logger, options) { _symo823m = symo823m; }
/// <summary> /// Initializes a new instance of the <see cref="HealthCheck"/> class. /// </summary> /// <param name="symo823m">The ISYMO823M instance.</param> /// <param name="options">The application options.</param> /// <param name="logger">The application logger.</param> public HealthCheck(ISYMO823M symo823m, IOptions <AppSettings> options, ILogger <HealthCheck> logger) : base(logger, options) { _symo823m = symo823m; }
/// <summary> /// Initializes an instance of the <see cref="SYMO823MHub"/> class. /// </summary> /// <param name="symo823m">The SYMO823M instance.</param> /// <param name="logger">The application logger.</param> /// <param name="options">The application options.</param> public SYMO823MHub(ISYMO823M symo823m, ILogger <SYMO823MHub> logger, IOptions <AppSettings> options) : base(logger, options) { _symo823m = symo823m; }
/// <summary> /// Initializes an instance of the <see cref="SYMO823MMonitor"/> class. /// </summary> /// <param name="symo823m">The SYMO823M instance.</param> /// <param name="hub">The test data SignalR hub.</param> /// <param name="logger">The application logger.</param> /// <param name="options">The application options.</param> /// <param name="environment"></param> public SYMO823MMonitor(ISYMO823M symo823m, IHubContext <SYMO823MHub> hub, ILogger <SYMO823MMonitor> logger, IOptions <AppSettings> options, IHostingEnvironment environment) : base(logger, options, environment) { _symo823m = symo823m; _hub = hub; }
/// <summary> /// Initializes a new instance of the <see cref="ReadCommand"/> class. /// </summary> /// <param name="symo823m">The SYMO823M instance.</param> /// <param name="logger">The logger instance.</param> /// <param name="options">The setting options instance.</param> /// <param name="environment">The hosting environment instance.</param> public ReadCommand(ISYMO823M symo823m, ILogger <InfoCommand> logger, IOptions <AppSettings> options, IHostingEnvironment environment) : base(logger, options, environment) { _logger?.LogDebug("ReadCommand()"); // Setting the SYMO823M instance. _symo823m = symo823m; }
/// <summary> /// Initializes a new instance of the <see cref="TestWrite"/> class. /// </summary> /// <param name="outputHelper"></param> public TestWrite(SYMO823MFixture fixture, ITestOutputHelper outputHelper) { // Set the default culture. CultureInfo.CurrentCulture = new CultureInfo("en-US"); var loggerFactory = new LoggerFactory(); loggerFactory.AddProvider(new XunitLoggerProvider(outputHelper)); _logger = loggerFactory.CreateLogger <SYMO823M>(); _symo823m = fixture.SYMO823M; }
/// <summary> /// Initializes a new instance of the <see cref="RootCommand"/> class. /// The RootCommand sets default values for some properties using the application settings. /// </summary> /// <param name="symo823m">The SYMO823M instance.</param> /// <param name="logger">The logger instance.</param> /// <param name="options">The setting options instance.</param> /// <param name="environment">The hosting environment instance.</param> public RootCommand(ISYMO823M symo823m, ILogger <RootCommand> logger, IOptions <AppSettings> options, IHostingEnvironment environment) : base(logger, options, environment) { _logger?.LogDebug("RootCommand()"); // Setting default options from appsettings.json file. Address = _settings.TcpSlave.Address; Port = _settings.TcpSlave.Port; SlaveID = _settings.TcpSlave.ID; // Setting the SYMO823M instance. _symo823m = symo823m; }
public SYMO823MFixture() { // Set the default culture. CultureInfo.CurrentCulture = new CultureInfo("en-US"); var loggerFactory = new LoggerFactory(); var logger = loggerFactory.CreateLogger <SYMO823M>(); SYMO823M = new SYMO823M(logger, new TcpClient() { TcpMaster = new TcpMasterData(), TcpSlave = new TcpSlaveData() { Address = "127.0.0.1" } }); SYMO823M.ReadAllAsync().Wait(); }