Table of Contents

ToUri Method

Definition

Namespace
Cuemon
Assemblies
Cuemon.Core.dll
Source
src/Cuemon.Core/Extensions/StringDecoratorExtensions.cs

ToUri(IDecorator<string>, UriKind)

Converts the enclosed string of the specified decorator to its equivalent Uri representation.

public static Uri ToUri(this IDecorator<string> decorator, UriKind uriKind = UriKind.Absolute)

Parameters

decorator IDecorator<string>

The IDecorator<T> to extend.

uriKind UriKind

Specifies whether the URI string is a relative URI, absolute URI, or is indeterminate.

Returns

Uri

A Uri that corresponds to the enclosed string of the specified decorator and uriKind.

Exceptions

ArgumentNullException

decorator cannot be null.

ArgumentNullException

The enclosed string of the specified decorator cannot be null.

ArgumentException

The enclosed string of the specified decorator cannot be empty or consist only of white-space characters.