SwiftlyS2

CHandle

Struct CHandle

Namespace: SwiftlyS2.Shared.Natives

Assembly: SwiftlyS2.CS2.dll

public struct CHandle<T> : ICHandle where T : class, ISchemaClass<T>
Type Parameters
  • T

Implements

Inherited Members

Constructors

CHandle(uint)

public CHandle(uint raw)
Parameters

Properties

EntityIndex

public readonly uint EntityIndex { get; }
Property Value

Invalid

public static CHandle<T> Invalid { get; }
Property Value

IsValid

public readonly bool IsValid { get; }
Property Value

Raw

public uint Raw { readonly get; set; }
Property Value

SerialNumber

public readonly uint SerialNumber { get; }
Property Value

Value

public T? Value { readonly get; set; }
Property Value
  • T?

Methods

Equals(CHandle<T>?)

public readonly bool Equals(CHandle<T>? other)
Parameters
Returns

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override readonly bool Equals(object? obj)
Parameters
  • obj object? — The object to compare with the current instance.
Returns
  • booltrue if obj and this instance are the same type and represent the same value; otherwise, false.

FromPackedInt(int)

public static CHandle<T> FromPackedInt(int packed_handle)
Parameters
  • packed_handle int
Returns

GetHashCode()

Returns the hash code for this instance.

public override readonly int GetHashCode()
Returns
  • int — A 32-bit signed integer that is the hash code for this instance.

ToPackedInt()

public readonly int ToPackedInt()
Returns

ToString()

Returns the fully qualified type name of this instance.

public override readonly string ToString()
Returns
  • string — The fully qualified type name.

Operators

operator ==(CHandle<T>, CHandle<T>)

public static bool operator ==(CHandle<T> left, CHandle<T> right)
Parameters
Returns

implicit operator T(CHandle<T>)

public static implicit operator T(CHandle<T> handle)
Parameters
Returns
  • T

operator !=(CHandle<T>, CHandle<T>)

public static bool operator !=(CHandle<T> left, CHandle<T> right)
Parameters
Returns

On this page