public static ArgumentOutOfRangeException NotSupportedConversion(this EnsureExceptionHelper ensure, Type targetType, object sourceValue) { return(ensure.ArgumentOutOfRange( "TTarget", "Target type '{0}' can't be constructed from a value '{1}'.", targetType.FullName, sourceValue )); }
public static ArgumentOutOfRangeException ArgumentDirectoryNotExist(this EnsureExceptionHelper guard, string path, string argumentName) { return(guard.ArgumentOutOfRange(argumentName, "Path must point to an existing directory, Path '{0}' doesn't exist.", path)); }