public ATCFlightClient() { _config = JsonFileConfig.Instance.CommunicationConfig; _serverIp = _config.HostIp; _serverPort = _config.HostPort; //_client = new TcpClient(_serverIp, _serverPort); }
public DaemonConfig(Version version, CommunicationConfig communication, CacheConfig cache, PathsConfig paths) { this.Version = version; this.Communication = communication; this.Cache = cache; this.Paths = paths; }
public void loadJSON() { config = null; menu.DirectoryCheck(); //ファイルがない場合: 初期設定ファイルの生成 if (!File.Exists(jsonPath)) { config = new CommunicationConfig(); makeJSON(); } //ファイルの読込を試行 try { //ファイルの内容を一括読み出し string jsonString = File.ReadAllText(jsonPath, new UTF8Encoding(false)); //設定クラスをJSONデコードして生成 config = JsonUtility.FromJson <CommunicationConfig>(jsonString); //ファイルのバージョンが古い場合は、デフォルト設定にして警告(nullの可能性も考慮してtry内) if (config.jsonVer != jsonVerMaster) { menu.ShowDialogOKCancel(LanguageManager.config.jsonloaders.OLD_CONFIG_HEAD, "" + jsonPath + LanguageManager.config.jsonloaders.OLD_CONFIG_BODY, 3f, () => { //OK makeJSON(); }, () => { //キャンセル }); config = new CommunicationConfig(); } } catch (System.Exception e) { //JSONデコードに失敗した場合 Debug.Log(e.ToString()); config = null; } //デコード失敗した場合は、デフォルト設定にして警告 if (config == null) { config = new CommunicationConfig(); menu.ShowDialogOKCancel(LanguageManager.config.jsonloaders.CORRUPT_CONFIG_HEAD, "" + jsonPath + LanguageManager.config.jsonloaders.CORRUPT_CONFIG_BODY, 3f, () => { //OK makeJSON(); }, () => { //キャンセル }); } }
public TvMazeScraperService( IOptions <CommunicationConfig> appConfig, ILogger <TvMazeScraperService> logger, IMapper mapper, ITvMazeApiService tvMazeApiService, IImportInfoRepository importInfoRepository, IImportRequestRepository importRequestRepository, IStringsProvider strings, IMicroservicesCommunicationService communicationService) { _config = appConfig.Value; _logger = logger; _mapper = mapper; _tvMazeApiService = tvMazeApiService; _importInfoRepository = importInfoRepository; _importRequestRepository = importRequestRepository; _strings = strings; _communicationService = communicationService; }
public InterfaceConfig(Version version, CommunicationConfig communication) { this.Version = version; this.Communication = communication; }
public MicroservicesCommunicationService(IOptions <CommunicationConfig> config) { _config = config.Value; OpenChannels(); }
/// <summary> /// 无参构造函数 /// </summary> public JsonFileConfig() { CommunicationConfig = new CommunicationConfig(); }