//--------------------------------------------------------------------- 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())); }
//--------------------------------------------------------------------- private static Exception GetArgumentOutOfRangeException(ExceptionArgument argument, ExceptionRessource ressource) { return(new ArgumentOutOfRangeException(GetArgumentName(argument), GetResource(ressource))); }
public static void ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionRessource ressource) { throw GetArgumentOutOfRangeException(argument, ressource); }