for Push.
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
using KssSmaPlaLib.Batch.DTO;
|
||||
using KssSmaPlaLib.Commons;
|
||||
using KssSmaPlaLib.AutoTest.Script;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using KssSmaPlaLib.Batch.Commons;
|
||||
|
||||
namespace KssSmaPlaLib.Batch.StepInfo
|
||||
{
|
||||
public static class StepInfoUxer
|
||||
{
|
||||
public static bool TryCreateStepInfoFromIniDic(
|
||||
Dictionary<string, string> iniDic,
|
||||
out StepInfoDto stepInfo,
|
||||
out string resultMessage)
|
||||
{
|
||||
stepInfo = new StepInfoDto
|
||||
{
|
||||
StepList = new List<StepDto>()
|
||||
};
|
||||
resultMessage = string.Empty;
|
||||
|
||||
foreach (var key in iniDic.Keys.OrderBy(m => m))
|
||||
{
|
||||
// コメント行は除く
|
||||
if (key.Trim().StartsWith(";")) continue;
|
||||
|
||||
// タイトル
|
||||
if (key.Trim() == CommonUxer.DIC_KEY_TITLE)
|
||||
{
|
||||
stepInfo.Title = iniDic[key];
|
||||
continue;
|
||||
}
|
||||
|
||||
stepInfo.StepList.Add(new StepDto()
|
||||
{
|
||||
StepNo = key.Trim(),
|
||||
StepSignature = iniDic[key].Trim(),
|
||||
});
|
||||
}
|
||||
|
||||
if (stepInfo.StepList.Count == 0)
|
||||
{
|
||||
resultMessage = $"設定ファイルに処理区分のステップ情報が登録されていません。[タイトル:{stepInfo.Title}]";
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user