跳到主要内容
版本:Next

Struct ViewportHandle

Namespace: ReadyM.Cef
Assembly: ReadyM.Cef.dll

Identifies a viewport: a place a browser can be shown.

public readonly struct ViewportHandle : IEquatable<ViewportHandle>

Implements​

IEquatable<ViewportHandle>

Inherited Members​

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Remarks​

A handle rather than the object itself, so it can be passed to anyone without handing over the thing's lifetime, and so a stale one fails with a message instead of resurrecting something torn down. Handles are unique for the life of a registry and are never reused, including across destroy and recreate.

Constructors​

ViewportHandle(ulong)​

Identifies a viewport: a place a browser can be shown.

public ViewportHandle(ulong Value)

Parameters​

Value ulong

Remarks​

A handle rather than the object itself, so it can be passed to anyone without handing over the thing's lifetime, and so a stale one fails with a message instead of resurrecting something torn down. Handles are unique for the life of a registry and are never reused, including across destroy and recreate.

Properties​

IsValid​

Whether this names a viewport at all.

public bool IsValid { get; }

Property Value​

bool

None​

A viewport that was refused, and which does nothing rather than failing.

public static ViewportHandle None { get; }

Property Value​

ViewportHandle

Remarks​

Every operation taking a handle ignores this one, so a mod holding it carries on and nothing reaches the engine. Zero is never handed out: real handles start at one and are never reused.

Value​

public ulong Value { get; init; }

Property Value​

ulong

Methods​

Deconstruct(out ulong)​

public void Deconstruct(out ulong Value)

Parameters​

Value ulong

Equals(object)​

public override bool Equals(object obj)

Parameters​

obj object

Returns​

bool

Equals(ViewportHandle)​

public bool Equals(ViewportHandle other)

Parameters​

other ViewportHandle

Returns​

bool

GetHashCode()​

public override int GetHashCode()

Returns​

int

ToString()​

public override string ToString()

Returns​

string

Operators​

operator ==(ViewportHandle, ViewportHandle)​

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

Parameters​

left ViewportHandle

right ViewportHandle

Returns​

bool

operator !=(ViewportHandle, ViewportHandle)​

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

Parameters​

left ViewportHandle

right ViewportHandle

Returns​

bool

  • Remarks
  • Constructors
    • ViewportHandle(ulong)
  • Properties
    • IsValid
    • None
    • Value
  • Methods
    • Deconstruct(out ulong)
    • Equals(object)
    • Equals(ViewportHandle)
    • GetHashCode()
    • ToString()
  • Operators
    • operator ==(ViewportHandle, ViewportHandle)
    • operator !=(ViewportHandle, ViewportHandle)