using System.Collections.Generic; using System.Collections.ObjectModel; namespace BriarQueen.Data.Identifiers { public enum DocumentEntryID { None = 0, C1CarNewspaper, } public enum ClueEntryID { None = 0, JasonsNote, } public enum PhotoEntryID { None = 0, } public static class CodexEntryIDs { private const string DOCUMENT_PREFIX = "Codex:Document"; private const string CLUE_PREFIX = "Codex:Clue"; private const string PHOTO_PREFIX = "Codex:Photo"; private static readonly IReadOnlyDictionary _documents = new ReadOnlyDictionary( new Dictionary { { DocumentEntryID.C1CarNewspaper, GetDocumentIdentifier(DocumentEntryID.C1CarNewspaper) }, }); private static readonly IReadOnlyDictionary _clues = new ReadOnlyDictionary( new Dictionary { { ClueEntryID.JasonsNote, GetClueIdentifier(ClueEntryID.JasonsNote) }, }); private static readonly IReadOnlyDictionary _photos = new ReadOnlyDictionary( new Dictionary { }); public static string Get(DocumentEntryID id) { return _documents.TryGetValue(id, out var value) ? value : string.Empty; } public static string Get(ClueEntryID id) { return _clues.TryGetValue(id, out var value) ? value : string.Empty; } public static string Get(PhotoEntryID id) { return _photos.TryGetValue(id, out var value) ? value : string.Empty; } private static string GetDocumentIdentifier(DocumentEntryID id) { return $"{DOCUMENT_PREFIX}:{id}"; } private static string GetClueIdentifier(ClueEntryID id) { return $"{CLUE_PREFIX}:{id}"; } private static string GetPhotoIdentifier(PhotoEntryID id) { return $"{PHOTO_PREFIX}:{id}"; } } }