Table of Contents

Class NamedUri

Namespace
CSF.Screenplay.Selenium
Assembly
CSF.Screenplay.Selenium.dll

Model containing a Uri with a corresponding human-readable name.

public sealed class NamedUri : IHasName
Inheritance
NamedUri
Implements
Inherited Members

Remarks

This model allows for the association of human-readable names with URIs. This is most useful when making use of Screenplay reports, where the human-readable name can be used to describe the URI in a more user-friendly way.

Note the inclusion of implicit conversion operators which allow for seamless conversion from Uri and/or string instances to instances of this type.

Constructors

NamedUri(string, string)

Initializes a new instance of the NamedUri class.

public NamedUri(string uri, string name = null)

Parameters

uri string

The URI to associate with this instance.

name string

The human-readable name for the URI. If null, the URI string will be used as the name.

NamedUri(Uri, string)

Initializes a new instance of the NamedUri class.

public NamedUri(Uri uri, string name = null)

Parameters

uri Uri

The URI to associate with this instance.

name string

The human-readable name for the URI. If null, the URI string will be used as the name.

Properties

Name

Gets the human-readable name for this Uri.

public string Name { get; }

Property Value

string

Uri

Gets the Uri associated with this instance.

public Uri Uri { get; }

Property Value

Uri

Operators

implicit operator NamedUri(string)

Converts a string to a NamedUri.

public static implicit operator NamedUri(string uri)

Parameters

uri string

The URI to convert.

Returns

NamedUri

A new NamedUri instance.

implicit operator NamedUri(Uri)

Converts a Uri to a NamedUri.

public static implicit operator NamedUri(Uri uri)

Parameters

uri Uri

The URI to convert.

Returns

NamedUri

A new NamedUri instance.