swiftlys2/docs/api/ai/
API Reference Natives

CHandle`1

Struct
Namespace: SwiftlyS2.Shared.Natives · Assembly: SwiftlyS2.CS2.dll
public struct CHandle<T> : ICHandle where T : class, ISchemaClass<T>
Implements ICHandle
View source

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
CHandle<T>

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
  • otherCHandle<T>?
Returns

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override readonly bool Equals(object? obj)
Parameters
  • objobject?The object to compare with the current instance.
Returns
true 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_handleint
Returns
CHandle<T>

GetHashCode()

Returns the hash code for this instance.

public override readonly int GetHashCode()
Returns
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
The fully qualified type name.

Operators

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

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

implicit operator T(CHandle<T>)

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

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

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