// train:モデル作成、 predict:モデル適用 public Upload(InputFormData <UploadRequestParam> paras) { SettingData setting = SettingDataCommand.LoadFile(paras.SettingFile); ApiKey = setting.ApiKey; ApiSecret = setting.ApiSecret; formData.Add(new StringContent(ApiKey), "key"); formData.Add(new StringContent(ApiSecret), "secret"); formData.Add(new StringContent(paras.RequestParam.Method), "method"); }
public ModeleCreate(InputFormData <ModelCreateRequestRaram> iData) { SettingData setting = SettingDataCommand.LoadFile(iData.SettingFile); ApiKey = setting.ApiKey; ApiSecret = setting.ApiSecret; modelCreateReqData.Key = ApiKey; modelCreateReqData.Secret = ApiSecret; modelCreateReqData.WaitTime = (int)TimeOut; }
public Summary(InputFormData <SummaryRequestParam> paras) { SettingData setting = SettingDataCommand.LoadFile(paras.SettingFile); ApiKey = setting.ApiKey; ApiSecret = setting.ApiSecret; summaryReqData.Key = ApiKey; summaryReqData.Secret = ApiSecret; summaryReqData.WaitTime = (int)TimeOut; }
public static SettingData LoadFile(FileInfo file) { SettingData setting = new SettingData(); if (file.Exists) { string data = TextUtility.ReadTXT(file.FullName, Encoding.GetEncoding("utf-8")); setting = JsonUtility.Deserialize <SettingData>(data); } return(setting); }
public static void UpdateFile(FileInfo file, SettingData data) { string json = JsonUtility.Serialize(data); TextUtility.WriteTXT(file.FullName, json, Encoding.GetEncoding("utf-8")); }