/// <summary>
 /// Returns default directory name for given <paramref name="dlc"/>.
 /// </summary>
 /// <param name="dlc">AppId of a DLC.</param>
 /// <returns>Default directory name for DLC.</returns>
 /// <exception cref="UnsupportedDlcException">Thrown when default directory name is not available for given <paramref name="dlc"/>.</exception>
 public static string GetName(DlcAppId dlc)
 {
     return(dlc switch
     {
         DlcAppId.Unknown => throw new UnsupportedDlcException(DlcAppId.Unknown),
         DlcAppId.Csla => Csla,
         DlcAppId.Gm => Gm,
         DlcAppId.Sog => Sog,
         _ => throw new UnsupportedDlcException(dlc)
     });
Exemple #2
0
 private static string GetDefaultMessage(DlcAppId dlc) => $"DLC {dlc} is not supported.";
Exemple #3
0
 public UnsupportedDlcException(DlcAppId dlc, string message) : base(message)
 {
     Dlc = dlc;
 }
Exemple #4
0
 public UnsupportedDlcException(DlcAppId dlc) : this(dlc, GetDefaultMessage(dlc))
 {
 }