Class Requires
Assert Class.
Inheritance
Namespace: DotNetNuke.Common
Assembly: DotNetNuke.dll
Syntax
public static class Requires : object
Methods
| Improve this Doc View SourceIsTypeOf<T>(String, Object)
Determines whether argValue
is type of T
.
Declaration
public static void IsTypeOf<T>(string argName, object argValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | argName | Name of the arg. |
System.Object | argValue | The arg value. |
Type Parameters
Name | Description |
---|---|
T | The expected type. |
NotNegative(String, Int32)
Determines whether argValue
is less than zero.
Declaration
public static void NotNegative(string argName, int argValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | argName | Name of the arg. |
System.Int32 | argValue | The arg value. |
NotNull(String, Object)
Determines whether the argValue
is null.
Declaration
public static void NotNull(string argName, object argValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | argName | Name of the arg. |
System.Object | argValue | The arg value. |
NotNull<T>(T)
Determines whether the item
is null.
Declaration
public static void NotNull<T>(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The object to test. |
Type Parameters
Name | Description |
---|---|
T | The type of the item. |
NotNullOrEmpty(String, String)
Determines whether the argValue
is null or empty.
Declaration
public static void NotNullOrEmpty(string argName, string argValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | argName | Name of the arg. |
System.String | argValue | The arg value. |
NotNullOrHasNoWhiteSpace(String, String)
Determines whether the argValue
is null, empty, or has whitespace only.
Declaration
public static void NotNullOrHasNoWhiteSpace(string argName, string argValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | argName | Name of the arg. |
System.String | argValue | The arg value. |
PropertyNotEqualTo<TValue>(String, String, TValue, TValue)
Determines whether propertyValue
equal to testValue
.
Declaration
public static void PropertyNotEqualTo<TValue>(string argName, string argProperty, TValue propertyValue, TValue testValue)
where TValue : IEquatable<TValue>
Parameters
Type | Name | Description |
---|---|---|
System.String | argName | Name of the arg. |
System.String | argProperty | The arg property. |
TValue | propertyValue | The property value. |
TValue | testValue | The test value. |
Type Parameters
Name | Description |
---|---|
TValue | The type of the value. |
PropertyNotNegative(String, String, Int32)
Determines whether propertyValue
is less than zero.
Declaration
public static void PropertyNotNegative(string argName, string argProperty, int propertyValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | argName | Name of the arg. |
System.String | argProperty | The arg property. |
System.Int32 | propertyValue | The property value. |
PropertyNotNegative<T>(T, String)
Determines whether a property is negative.
Declaration
public static void PropertyNotNegative<T>(T item, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
T | item | The object to test. |
System.String | propertyName | Name of the property. |
Type Parameters
Name | Description |
---|---|
T | The type of |
PropertyNotNull(String, String)
Determines whether the argValue
is null.
Declaration
public static void PropertyNotNull(string argName, string argValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | argName | Name of the arg. |
System.String | argValue | The arg value. |
PropertyNotNull<T>(T, String)
Determines whether a property is null.
Declaration
public static void PropertyNotNull<T>(T item, string propertyName)
where T : class
Parameters
Type | Name | Description |
---|---|---|
T | item | The object to test. |
System.String | propertyName | Name of the property. |
Type Parameters
Name | Description |
---|---|
T | The type of item. |
PropertyNotNullOrEmpty(String, String, String)
Determines whether propertyValue
is not null or empty.
Declaration
public static void PropertyNotNullOrEmpty(string argName, string argProperty, string propertyValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | argName | Name of the arg. |
System.String | argProperty | The arg property. |
System.String | propertyValue | The property value. |
PropertyNotNullOrEmpty<T>(T, String)
Determines whether a property is null or empty.
Declaration
public static void PropertyNotNullOrEmpty<T>(T item, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
T | item | The object to test. |
System.String | propertyName | Name of the property. |
Type Parameters
Name | Description |
---|---|
T | The type of item. |