/// <summary> /// FileEntryを追加する。 /// </summary> /// <param name="fileEntry">FileEntry</param> public void AddEntry(MieFileEntry fileEntry) { if (this.Items.ContainsKey(fileEntry.FileCode)) { var msg = $"Duplicate fileCode({fileEntry.FileCode})"; logger.Fatal(msg); throw new Exception(msg); } else { this.Items.Add(fileEntry.FileCode, fileEntry); } }
/// <summary> /// FileIDとHashを登録する。 /// </summary> /// <param name="fileID">FileID</param> /// <param name="fileCode">FileCode</param> /// <param name="languageType">言語区分</param> public void AddEntryByFileIdAndFileCode(string fileID, long fileCode, MieProduct.NLanguageType languageType) { MieFileEntry mieFileEntry = new MieFileEntry(fileID, fileCode, languageType); if (this.Items.ContainsKey(mieFileEntry.FileCode)) { var msg = $"Duplicate fileID({fileCode}). Hash({mieFileEntry.FileCode})"; logger.Warn(msg); } else { this.Items.Add(mieFileEntry.FileCode, mieFileEntry); } }