Table of Contents

Class RealmCreatedEventArgs

Namespace
WebDriverBiDi.Script
Assembly
WebDriverBiDi.dll

Object containing event data for the event raised when a script realm is created.

public record RealmCreatedEventArgs : WebDriverBiDiEventArgs, IEquatable<WebDriverBiDiEventArgs>, IEquatable<RealmCreatedEventArgs>
Inheritance
RealmCreatedEventArgs
Implements
Inherited Members

Constructors

RealmCreatedEventArgs(RealmCreatedEventArgs)

protected RealmCreatedEventArgs(RealmCreatedEventArgs original)

Parameters

original RealmCreatedEventArgs

RealmCreatedEventArgs(RealmInfo)

Initializes a new instance of the RealmCreatedEventArgs class.

public RealmCreatedEventArgs(RealmInfo info)

Parameters

info RealmInfo

The RealmInfo object containing information about the realm being created.

Properties

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

Origin

Gets the origin of the realm being created.

public string Origin { get; }

Property Value

string

RealmId

Gets the ID of the realm being created.

public string RealmId { get; }

Property Value

string

Type

Gets the type of the realm being created.

public RealmType Type { get; }

Property Value

RealmType

Methods

As<T>()

Casts the underlying realm info to a type-specific realm info, throwing if it is not of that type. Use TryAs<T>(out T?) to test without throwing.

public T As<T>() where T : RealmInfo

Returns

T

The underlying RealmInfo cast to the specified type.

Type Parameters

T

The specific type of RealmInfo to return.

Exceptions

WebDriverBiDiException

Thrown if this RealmInfo is not the specified type.

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(RealmCreatedEventArgs?)

public virtual bool Equals(RealmCreatedEventArgs? other)

Parameters

other RealmCreatedEventArgs

Returns

bool

Equals(WebDriverBiDiEventArgs?)

public override sealed bool Equals(WebDriverBiDiEventArgs? other)

Parameters

other WebDriverBiDiEventArgs

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

TryAs<T>(out T?)

Attempts to cast the underlying realm info to a type-specific realm info, returning false rather than throwing when it is not of that type.

public bool TryAs<T>(out T? result) where T : RealmInfo

Parameters

result T

When this method returns, contains the cast value or null if the cast failed.

Returns

bool

true if the cast was successful; otherwise, false.

Type Parameters

T

The specific type of RealmInfo to return.

Operators

operator ==(RealmCreatedEventArgs?, RealmCreatedEventArgs?)

public static bool operator ==(RealmCreatedEventArgs? left, RealmCreatedEventArgs? right)

Parameters

left RealmCreatedEventArgs
right RealmCreatedEventArgs

Returns

bool

operator !=(RealmCreatedEventArgs?, RealmCreatedEventArgs?)

public static bool operator !=(RealmCreatedEventArgs? left, RealmCreatedEventArgs? right)

Parameters

left RealmCreatedEventArgs
right RealmCreatedEventArgs

Returns

bool