/// <summary>Adds a value to a HashSet. Creates a new HashSet if the value passed is null</summary> /// <param name="bookData"></param> /// <param name="key"></param> /// <param name="value"></param> private static void AddOrNew(Dictionary <CharacterVerseData.StandardCharacter, HashSet <string> > bookData, CharacterVerseData.StandardCharacter key, string value) { if (bookData[key] == null) { bookData[key] = new HashSet <string>(); } bookData[key].Add(value); }
public void SetStandardCharacter(string bookId, CharacterVerseData.StandardCharacter standardCharacterType) { CharacterId = CharacterVerseData.GetStandardCharacterId(bookId, standardCharacterType); Delivery = null; }
public bool CharacterIs(string bookId, CharacterVerseData.StandardCharacter standardCharacterType) { return(CharacterId == CharacterVerseData.GetStandardCharacterId(bookId, standardCharacterType)); }