Class SafeComponentHandle<T>
Provides a safe pointer to an open.mp component of type T.
public sealed class SafeComponentHandle<T> where T : unmanaged, IComponent.IManagedInterface
Type Parameters
TThe 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
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
safeHandleSafeComponentHandle<T>
Returns
- T