• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class Requires

Assert Class.

Inheritance
System.Object
Requires
Namespace: DotNetNuke.Common
Assembly: DotNetNuke.dll
Syntax
public static class Requires : object

Methods

| Improve this Doc View Source

IsTypeOf<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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 item.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

  • View Source
Back to top by the community, for the community... #DNNCMS