TaskArgumentValidationAttribute Class

Summary

Allows you to create your own validation for incoming Task Arguments.
Assembly
Cake.Sprinkles.Module.dll
Namespace
Cake.Sprinkles.Module.Validation
Base Types
  • Attribute
graph BT Type-->Base0["Attribute"] Type["TaskArgumentValidationAttribute"] class Type type-node

Syntax

public abstract class TaskArgumentValidationAttribute : Attribute

Attributes

Type Description
NullableContextAttribute
NullableAttribute
AttributeUsageAttribute

Constructors

Properties

Name Value Summary
DescriptionOfValidation string
Gets a short Description to indicate to users of the build tool how an argument is validated.
ErrorMessage string
Gets the error message to indicate to users of the build tool that a failure occurred.

Methods

Name Value Summary
IsArgumentValid(string) bool
Validates the incoming string argument.

Extension Methods

Name Value Summary
Dump<TaskArgumentValidationAttribute>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<TaskArgumentValidationAttribute>(TaskArgumentValidationAttribute[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<TaskArgumentValidationAttribute>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<TaskArgumentValidationAttribute>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<TaskArgumentValidationAttribute>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<TaskArgumentValidationAttribute>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin