Table of Contents

Method TryParseUri

Namespace
SodaFlow.Functional
Assembly
SodaFlow.Functional.dll

TryParseUri(string?)

Parses an absolute Uri from this string, if it holds one.

[Pure]
public static Maybe<Uri> TryParseUri(this string? value)

Parameters

value string

The string to parse. A null string gives no value.

Returns

Maybe<Uri>

A Maybe<T> containing the parsed value, and one containing no value if value does not hold an absolute URI.

Remarks

TryParseUri(string?, UriKind)

Parses a Uri of the given type from this string, if it holds one.

[Pure]
public static Maybe<Uri> TryParseUri(this string? value, UriKind uriKind)

Parameters

value string

The string to parse. A null string gives no value.

uriKind UriKind

The permitted type: absolute, relative, or one of the two.

Returns

Maybe<Uri>

A Maybe<T> containing the parsed value, and one containing no value if value does not hold a URI of that type.

Remarks