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
originalRealmCreatedEventArgs
RealmCreatedEventArgs(RealmInfo)
Initializes a new instance of the RealmCreatedEventArgs class.
public RealmCreatedEventArgs(RealmInfo info)
Parameters
infoRealmInfoThe RealmInfo object containing information about the realm being created.
Properties
EqualityContract
protected override Type EqualityContract { get; }
Property Value
Origin
Gets the origin of the realm being created.
public string Origin { get; }
Property Value
RealmId
Gets the ID of the realm being created.
public string RealmId { get; }
Property Value
Type
Gets the type of the realm being created.
public RealmType Type { get; }
Property Value
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
TThe 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
objobject
Returns
Equals(RealmCreatedEventArgs?)
public virtual bool Equals(RealmCreatedEventArgs? other)
Parameters
otherRealmCreatedEventArgs
Returns
Equals(WebDriverBiDiEventArgs?)
public override sealed bool Equals(WebDriverBiDiEventArgs? other)
Parameters
otherWebDriverBiDiEventArgs
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
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
resultTWhen this method returns, contains the cast value or null if the cast failed.
Returns
Type Parameters
TThe specific type of RealmInfo to return.
Operators
operator ==(RealmCreatedEventArgs?, RealmCreatedEventArgs?)
public static bool operator ==(RealmCreatedEventArgs? left, RealmCreatedEventArgs? right)
Parameters
leftRealmCreatedEventArgsrightRealmCreatedEventArgs
Returns
operator !=(RealmCreatedEventArgs?, RealmCreatedEventArgs?)
public static bool operator !=(RealmCreatedEventArgs? left, RealmCreatedEventArgs? right)
Parameters
leftRealmCreatedEventArgsrightRealmCreatedEventArgs