JsScriptContextScope Struct

The scope returned by JsEngine.EnterActiveScriptOrModule: disposing it pops the execution context.

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

Methods

NameDescription
Dispose()Pops the execution context.
Equals(JsScriptContextScope)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.

Pops the execution context.

public void Dispose()

Equals overloads

Equals(JsScriptContextScope)

JsScriptContextScope.cs

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

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

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

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.

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 ==(JsScriptContextScope, JsScriptContextScope)Compares two scopes.
operator !=(JsScriptContextScope, JsScriptContextScope)Compares two scopes.

operator ==(JsScriptContextScope, JsScriptContextScope)

JsScriptContextScope.cs

Compares two scopes.

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

operator !=(JsScriptContextScope, JsScriptContextScope)

JsScriptContextScope.cs

Compares two scopes.

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