Guard.IsEmpty Method

Definition

Overloads

IsEmpty(String, String)

Asserts that the input String instance must be empty.

IsEmpty<T>(ReadOnlySpan<T>, String)

Asserts that the input ReadOnlySpan<T> instance must be empty.

IsEmpty<T>(T[], String)

Asserts that the input array instance must be empty.

IsEmpty<T>(ReadOnlyMemory<T>, String)

Asserts that the input ReadOnlyMemory<T> instance must be empty.

IsEmpty<T>(Span<T>, String)

Asserts that the input Span<T> instance must be empty.

IsEmpty<T>(List<T>, String)

Asserts that the input List<T> instance must be empty.

IsEmpty<T>(IReadOnlyCollection<T>, String)

Asserts that the input IReadOnlyCollection<T> instance must be empty.

IsEmpty<T>(ICollection<T>, String)

Asserts that the input ICollection<T> instance must be empty.

IsEmpty<T>(Memory<T>, String)

Asserts that the input Memory<T> instance must be empty.

IsEmpty(String, String)

Asserts that the input String instance must be empty.

public static void IsEmpty (string text, string name);
static member IsEmpty : string * string -> unit
Public Shared Sub IsEmpty (text As String, name As String)

Parameters

text
String

The input String instance to test.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if text is empty.

Applies to

IsEmpty<T>(ReadOnlySpan<T>, String)

Asserts that the input ReadOnlySpan<T> instance must be empty.

public static void IsEmpty<T> (ReadOnlySpan<T> span, string name);
static member IsEmpty : ReadOnlySpan<'T> * string -> unit
Public Shared Sub IsEmpty(Of T) (span As ReadOnlySpan(Of T), name As String)

Type Parameters

T

The item of items in the input ReadOnlySpan<T> instance.

Parameters

span
ReadOnlySpan<T>

The input ReadOnlySpan<T> instance to check the size for.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if the size of span is != 0.

Applies to

IsEmpty<T>(T[], String)

Asserts that the input array instance must be empty.

public static void IsEmpty<T> (T[] array, string name);
static member IsEmpty : 'T[] * string -> unit
Public Shared Sub IsEmpty(Of T) (array As T(), name As String)

Type Parameters

T

The item of items in the input array instance.

Parameters

array
T[]

The input array instance to check the size for.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if the size of array is != 0.

Applies to

IsEmpty<T>(ReadOnlyMemory<T>, String)

Asserts that the input ReadOnlyMemory<T> instance must be empty.

public static void IsEmpty<T> (ReadOnlyMemory<T> memory, string name);
static member IsEmpty : ReadOnlyMemory<'T> * string -> unit
Public Shared Sub IsEmpty(Of T) (memory As ReadOnlyMemory(Of T), name As String)

Type Parameters

T

The item of items in the input ReadOnlyMemory<T> instance.

Parameters

memory
ReadOnlyMemory<T>

The input ReadOnlyMemory<T> instance to check the size for.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if the size of memory is != 0.

Applies to

IsEmpty<T>(Span<T>, String)

Asserts that the input Span<T> instance must be empty.

public static void IsEmpty<T> (Span<T> span, string name);
static member IsEmpty : Span<'T> * string -> unit
Public Shared Sub IsEmpty(Of T) (span As Span(Of T), name As String)

Type Parameters

T

The item of items in the input Span<T> instance.

Parameters

span
Span<T>

The input Span<T> instance to check the size for.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if the size of span is != 0.

Applies to

IsEmpty<T>(List<T>, String)

Asserts that the input List<T> instance must be empty.

public static void IsEmpty<T> (System.Collections.Generic.List<T> list, string name);
static member IsEmpty : System.Collections.Generic.List<'T> * string -> unit
Public Shared Sub IsEmpty(Of T) (list As List(Of T), name As String)

Type Parameters

T

The item of items in the input List<T> instance.

Parameters

list
List<T>

The input List<T> instance to check the size for.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if the size of list is != 0.

Applies to

IsEmpty<T>(IReadOnlyCollection<T>, String)

Asserts that the input IReadOnlyCollection<T> instance must be empty.

public static void IsEmpty<T> (System.Collections.Generic.IReadOnlyCollection<T> collection, string name);
static member IsEmpty : System.Collections.Generic.IReadOnlyCollection<'T> * string -> unit
Public Shared Sub IsEmpty(Of T) (collection As IReadOnlyCollection(Of T), name As String)

Type Parameters

T

The item of items in the input IReadOnlyCollection<T> instance.

Parameters

collection
IReadOnlyCollection<T>

The input IReadOnlyCollection<T> instance to check the size for.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if the size of collection is != 0.

Applies to

IsEmpty<T>(ICollection<T>, String)

Asserts that the input ICollection<T> instance must be empty.

public static void IsEmpty<T> (System.Collections.Generic.ICollection<T> collection, string name);
static member IsEmpty : System.Collections.Generic.ICollection<'T> * string -> unit
Public Shared Sub IsEmpty(Of T) (collection As ICollection(Of T), name As String)

Type Parameters

T

The item of items in the input ICollection<T> instance.

Parameters

collection
ICollection<T>

The input ICollection<T> instance to check the size for.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if the size of collection is != 0.

Applies to

IsEmpty<T>(Memory<T>, String)

Asserts that the input Memory<T> instance must be empty.

public static void IsEmpty<T> (Memory<T> memory, string name);
static member IsEmpty : Memory<'T> * string -> unit
Public Shared Sub IsEmpty(Of T) (memory As Memory(Of T), name As String)

Type Parameters

T

The item of items in the input Memory<T> instance.

Parameters

memory
Memory<T>

The input Memory<T> instance to check the size for.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if the size of memory is != 0.

Applies to