public async Task <bool> Handle(ExecuteConsoleWriteRequest executeConsoleWriteRequest, IOutputPort <ExecuteConsoleWriteResponse> outputPort) { Type currentType = this.GetType(); try { Console.WriteLine("exeute"); await this._serverLoggerRepository.Info($"Execute ExecuteConsoleWrite.Developmentaaaasdfasfddfas", currentType); await this._serverLoggerRepository.Warning($"Execute ExecuteConsoleWrite.Development WARNING", currentType); await this._serverLoggerRepository.Error($"Execute ExecuteConsoleWrite.Developmentaaaaasfdasdfasdfa", null, currentType); //apiKeyの取得 //var responseGetAppSettingList = _mstAppSettingRepository.GetAppSettingList(); //if (!responseGetAppSettingList.Success) //{ // return false; //} //outputPort.Handle(new ExecuteConsoleWriteResponse(new[] { new Error("", "") })); // ToDo: 上位がoutputPortを指定すること return(true); } catch (Exception ex) { await this._serverLoggerRepository.Error($"{Properties.ErrorResources.ErrorOccuredException}", ex, currentType); outputPort.Handle(new ExecuteConsoleWriteResponse(new[] { new Error("", "") })); return(false); } }
public async Task <bool> ExecuteConsoleWriteLine() { //TODO: responseの修正 var useCaseRequest = new ExecuteConsoleWriteRequest("outputstr"); await this._ExecuteConsoleWriteUseCase.Handle(useCaseRequest, null); return(false); }