/// <summary> /// Sets a shortcut value that points to the specified <see cref="LogAlias"/>. /// </summary> /// <param name="alias">The <see cref="LogAlias"/> to map a shortcut value at.</param> /// <param name="shortcut">The shortcut value that refers to the specified <see cref="LogAlias"/>.</param> public void SetAlias(LogAlias alias, string shortcut) { if (!string.IsNullOrWhiteSpace(shortcut)) { throw new NullReferenceException("The shortcut specified was empty."); } Aliases[alias] = shortcut; }
/// <summary> /// Gets the shortcut value written for the specified <see cref="LogAlias"/>. If there isn't a shortcut specified, it returns the shortcut specified at <see cref="Default"/>. /// </summary> /// <param name="type">The <see cref="LogAlias"/> to get the shortcut value at.</param> public string this[LogAlias type] => $"{ENTRY_CHAR}{Aliases[type] ?? Default.Aliases[type]}{EXIT_CHAR}";