JsEngineScope Struct

The scope returned by JsEngine.Enter: disposing it restores the previous engine of the thread.

public readonly struct JsEngineScope : IDisposable, IEquatable<JsEngineScope>
Implements

Methods

NameDescription
Dispose()Restores the previous engine of the thread.
Equals(JsEngineScope)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Indicates whether this instance and a specified object are equal.
GetHashCode()Returns the hash code for this instance.

Restores the previous engine of the thread.

public void Dispose()

Equals overloads

Equals(JsEngineScope)

JsEngineScope.cs

Indicates whether the current object is equal to another object of the same type.

public bool Equals(JsEngineScope other)
Parameters
other JsEngineScope
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

JsEngineScope.cs

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current instance.
Returns

bool true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

JsEngineScope.cs

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int A 32-bit signed integer that is the hash code for this instance.

Operators

NameDescription
operator ==(JsEngineScope, JsEngineScope)Compares two scopes.
operator !=(JsEngineScope, JsEngineScope)Compares two scopes.

operator ==(JsEngineScope, JsEngineScope)

JsEngineScope.cs

Compares two scopes.

public static bool operator ==(JsEngineScope left, JsEngineScope right)

Parameters

left JsEngineScope
right JsEngineScope

Returns

bool

operator !=(JsEngineScope, JsEngineScope)

JsEngineScope.cs

Compares two scopes.

public static bool operator !=(JsEngineScope left, JsEngineScope right)

Parameters

left JsEngineScope
right JsEngineScope

Returns

bool