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
- object.Equals(object?)
- object.Equals(object?, object?)
- object.GetHashCode()
- object.GetType()
- object.ReferenceEquals(object?, object?)
- object.ToString()
Constructors
CHandle(uint)
public CHandle(uint raw)Parameters
- raw uint
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
- other CHandle<T>?
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
- bool — true if
objand 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
- left CHandle<T>
- right CHandle<T>
Returns
implicit operator T(CHandle<T>)
public static implicit operator T(CHandle<T> handle)Parameters
- handle CHandle<T>
Returns
- T
operator !=(CHandle<T>, CHandle<T>)
public static bool operator !=(CHandle<T> left, CHandle<T> right)Parameters
- left CHandle<T>
- right CHandle<T>
Returns