Table of Contents

ThrowIfNotUri Method

Definition

Namespace
Cuemon
Assemblies
Cuemon.Kernel.dll
Source
src/Cuemon.Kernel/Validator.cs

ThrowIfNotUri(string, UriKind, string, string)

Validates and throws an ArgumentException if the specified argument does not have the format of a Uri.

public static void ThrowIfNotUri(string argument, UriKind uriKind = UriKind.Absolute, string message = "Value must be a URI.", string paramName = null)

Parameters

argument string

The value to be evaluated.

uriKind UriKind

The type of the URI.

message string

A message that describes the error.

paramName string

The name of the parameter that caused the exception.

Exceptions

ArgumentException

argument must be a Uri.

ArgumentOutOfRangeException

uriKind was set to an indeterminate value of RelativeOrAbsolute.