/// <summary> /// Gets the description of the flag. /// </summary> /// <param name="id">The flag id.</param> /// <returns></returns> internal static string GetFlagText(int id) { if (EveMonClient.IsDebugBuild) { EnsureInitialized(); } else { EnsureImportation(); } SerializableEveFlagsListItem flag = s_eveFlags?.FirstOrDefault(x => x.ID == id); return(flag?.Text ?? EveMonConstants.UnknownText); }
/// <summary> /// Gets the description of the flag. /// </summary> /// <param name="id">The flag id.</param> /// <returns></returns> internal static string GetFlagText(int id) { if (EveMonClient.IsDebugBuild) { EnsureInitialized(); } else { EnsureImportation(); } SerializableEveFlagsListItem flag = null; if (s_eveFlags != null) { flag = s_eveFlags[id]; } return(flag?.Text ?? EveMonConstants.UnknownText); }
/// <summary> /// Gets the description of the flag. /// </summary> /// <param name="name">The flag name.</param> /// <returns></returns> internal static int GetFlagID(string name) { if (EveMonClient.IsDebugBuild) { EnsureInitialized(); } else { EnsureImportation(); } SerializableEveFlagsListItem flag = null; if (s_eveFlags != null) { flag = s_eveFlags.Values.FirstOrDefault(x => x.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase)); } return(flag?.ID ?? 0); }
/// <summary> /// Gets the description of the flag. /// </summary> /// <param name="id">The flag id.</param> internal static string GetFlagText(int id) { if (EveMonClient.IsDebugBuild) { EnsureInitialized(); } else { EnsureImportation(); } SerializableEveFlagsListItem flag = null; // Some flags have been introduced that are not in the SDE if (s_eveFlags != null && !s_eveFlags.TryGetValue(id, out flag)) { flag = null; } return(flag?.Text ?? EveMonConstants.UnknownText); }