Struct IReadOnlyPool<T>
This type represents a pointer to an unmanaged open.mp IReadOnlyPool<T> interface.
[OpenMpApi(new Type[] { })]
public readonly struct IReadOnlyPool<T> : IEquatable<IReadOnlyPool<T>>, IReadOnlyPool<T>.IManagedInterface, IUnmanagedInterface where T : unmanaged, IUnmanagedInterface
Type Parameters
T
- Implements
- Inherited Members
Constructors
IReadOnlyPool(nint)
Initializes a new instance of the IReadOnlyPool<T> struct.
public IReadOnlyPool(nint handle)
Parameters
handlenintA pointer to the unmanaged interface.
Properties
Handle
Gets the handle to the unmanaged interface instance.
public nint Handle { get; }
Property Value
HasValue
Gets a value indicating whether the pointer has a value.
public bool HasValue { get; }
Property Value
Methods
Bounds(out Pair<Size, Size>)
Retrieves the bounds of the pool.
public void Bounds(out Pair<Size, Size> bounds)
Parameters
boundsPair<Size, Size>The output parameter that will contain the bounds of the pool as a pair of sizes.
Equals(IReadOnlyPool<T>)
public bool Equals(IReadOnlyPool<T> other)
Parameters
otherIReadOnlyPool<T>
Returns
Equals(object?)
public override bool Equals(object? other)
Parameters
otherobject
Returns
Get(int)
Gets the element at the specified index from the pool.
public T Get(int index)
Parameters
indexintThe index of the element to retrieve.
Returns
- T
The element at the specified index.
GetHashCode()
public override int GetHashCode()
Returns
Operators
operator ==(IReadOnlyPool<T>, object?)
Determines whether the specified values are equal.
public static bool operator ==(IReadOnlyPool<T> lhs, object? rhs)
Parameters
lhsIReadOnlyPool<T>The value on the left side of the operator.
rhsobjectThe value on the right side of the operator.
Returns
- bool
trueif the values are equal; otherwise,false.
operator !=(IReadOnlyPool<T>, object?)
Determines whether the specified values are not equal.
public static bool operator !=(IReadOnlyPool<T> lhs, object? rhs)
Parameters
lhsIReadOnlyPool<T>The value on the left side of the operator.
rhsobjectThe value on the right side of the operator.
Returns
- bool
trueif the values are not equal; otherwise,false.