Table of Contents

Class SafeComponentHandle<T>

Namespace
SampSharp.Entities
Assembly
SampSharp.OpenMp.Entities.dll

Provides a safe pointer to an open.mp component of type T.

public sealed class SafeComponentHandle<T> where T : unmanaged, IComponent.IManagedInterface

Type Parameters

T

The unmanaged open.mp component type.

Inheritance
SafeComponentHandle<T>
Inherited Members

Properties

HasValue

Gets a value indicating whether the current instance contains a valid value.

public bool HasValue { get; }

Property Value

bool

Value

Gets the current value stored in the container.

public T Value { get; }

Property Value

T

Operators

implicit operator T(SafeComponentHandle<T>)

Defines an implicit conversion from SafeComponentHandle<T> to T, allowing for seamless access to the underlying component value while ensuring safety against freed components.

public static implicit operator T(SafeComponentHandle<T> safeHandle)

Parameters

safeHandle SafeComponentHandle<T>

Returns

T