Condividi tramite


ValidateNotNullOrWhiteSpaceAttribute Class

Definition

Validates that the parameters's argument is not null, is not an empty string, is not a string that consists only of white-space characters, and is not an empty collection. If argument is a collection, each argument is verified.

[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)]
public sealed class ValidateNotNullOrWhiteSpaceAttribute : System.Management.Automation.ValidateNotNullOrAttributeBase
[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)>]
type ValidateNotNullOrWhiteSpaceAttribute = class
    inherit ValidateNotNullOrAttributeBase
Public NotInheritable Class ValidateNotNullOrWhiteSpaceAttribute
Inherits ValidateNotNullOrAttributeBase
Inheritance
Attributes

Constructors

ValidateNotNullOrWhiteSpaceAttribute()

Validates that the parameters's argument is not null, is not an empty string, is not a string that consists only of white-space characters, and is not an empty collection. If argument is a collection, each argument is verified.

Fields

_checkWhiteSpace

Used to check the type of string validation to perform.

(Inherited from ValidateNotNullOrAttributeBase)

Methods

IsArgumentCollection(Type, Boolean)

Check if the argument type is a collection.

(Inherited from NullValidationAttributeBase)
Validate(Object, EngineIntrinsics)

Validates that the parameters's argument is not null, is not an empty string, and is not an empty collection. If argument is a collection, each argument is verified. It can also validate that the parameters's argument is not a string that consists only of white-space characters.

(Inherited from ValidateNotNullOrAttributeBase)

Applies to