private void RemoveByCurrentlyOffered(GuildTask entity) { if (ByCurrentlyOffered.ContainsKey(entity.ID)) { ByCurrentlyOffered.Remove(entity.ID); } }
private void SetByCurrentlyOffered(GuildTask entity) { if (!ByCurrentlyOffered.ContainsKey(entity.ID) && entity.IsCurrentlyOffered) { ByCurrentlyOffered[entity.ID] = (GuildTask)entity.Clone(); } else if (ByCurrentlyOffered.ContainsKey(entity.ID) && !entity.IsCurrentlyOffered) { ByCurrentlyOffered.Remove(entity.ID); } }