Class ArgumentExtensions
Extension methods for guarding
Inheritance
System.Object
    ArgumentExtensions
  Inherited Members
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.ToString()
    
  Namespace: OfficeOpenXml.Utils
Assembly: EPPlus.dll
Syntax
public static class ArgumentExtensions
  Methods
IsInRange<T>(IArgument<T>, T, T, String)
Throws an ArgumentOutOfRangeException if the value of the argument is out of the supplied range
Declaration
public static void IsInRange<T>(this IArgument<T> argument, T min, T max, string argumentName)
    where T : IComparable
  Parameters
| Type | Name | Description | 
|---|---|---|
| IArgument<T> | argument | The argument to check  | 
      
| T | min | Min value of the supplied range  | 
      
| T | max | Max value of the supplied range  | 
      
| System.String | argumentName | parameter/argument name  | 
      
Type Parameters
| Name | Description | 
|---|---|
| T | Type implementing System.IComparable  | 
      
Exceptions
| Type | Condition | 
|---|---|
| System.ArgumentOutOfRangeException | 
IsNotNull<T>(IArgument<T>, String)
Throws an ArgumentNullException if argument is null
Declaration
public static void IsNotNull<T>(this IArgument<T> argument, string argumentName)
    where T : class
  Parameters
| Type | Name | Description | 
|---|---|---|
| IArgument<T> | argument | Argument to check  | 
      
| System.String | argumentName | parameter/argument name  | 
      
Type Parameters
| Name | Description | 
|---|---|
| T | Argument type  | 
      
Exceptions
| Type | Condition | 
|---|---|
| System.ArgumentNullException | 
IsNotNullOrEmpty(IArgument<String>, String)
Throws an System.ArgumentNullException if the string argument is null or empty
Declaration
public static void IsNotNullOrEmpty(this IArgument<string> argument, string argumentName)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IArgument<System.String> | argument | Argument to check  | 
      
| System.String | argumentName | parameter/argument name  | 
      
Exceptions
| Type | Condition | 
|---|---|
| System.ArgumentNullException |