Table of Contents

ThrowIfUri Method

Definition

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

ThrowIfUri(string, UriKind, string, string)

Validates and throws an ArgumentException if the specified argument has the format of a Uri.

public static void ThrowIfUri(string argument, UriKind uriKind = UriKind.Absolute, string message = "Value cannot 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 cannot be a Uri.

ArgumentOutOfRangeException

uriKind was set to an indeterminate value of RelativeOrAbsolute.