Exemple #1
0
        //---------------------------------------------------------------------
        private static string GetResource(ExceptionRessource ressource)
        {
            Debug.Assert(Enum.IsDefined(typeof(ExceptionRessource), ressource),
                         $"The enum value is not defined, please check the {nameof(ExceptionRessource)} enum.");

            return(s_resources.Value.GetString(ressource.ToString()));
        }
Exemple #2
0
 //---------------------------------------------------------------------
 private static Exception GetArgumentOutOfRangeException(ExceptionArgument argument, ExceptionRessource ressource)
 {
     return(new ArgumentOutOfRangeException(GetArgumentName(argument), GetResource(ressource)));
 }
Exemple #3
0
 public static void ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionRessource ressource)
 {
     throw GetArgumentOutOfRangeException(argument, ressource);
 }