AssertExtensions Class

Summary

Contains extensions for guard clauses
Assembly
Cake.Incubator.dll
Namespace
Cake.Incubator.AssertExtensions
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["AssertExtensions"] class Type type-node

Syntax

public static class AssertExtensions

Attributes

Type Description
CakeAliasCategoryAttribute

Methods

Name Value Summary
IsNullOrEmpty(string) bool
static
IsNullOrEmpty<T>(ICollection<T>) bool
static
ThrowIfNull<T>(T, string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
static
ThrowIfNull<T>(T, string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
static
ThrowIfNullOrEmpty(string, string) string
Throws a System.ArgumentNullException if a string is null or empty, otherwise returns the value
static
ThrowIfNullOrWhiteSpace(string, string) string
Throws a System.ArgumentNullException if a string is null or white space, otherwise returns the value
static

Extension Methods

Name Value Summary
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Returns the string value or a Not set> markup suitable for Spectre.Console.
Requires the Cake.Issues addin