Table of Contents

Struct IComponentList

Namespace
SampSharp.OpenMp.Core.Api
Assembly
SampSharp.OpenMp.Core.dll

This type represents a pointer to an unmanaged open.mp IComponentList interface.

[OpenMpApi(new Type[] { })]
public readonly struct IComponentList : IEquatable<IComponentList>, IComponentList.IManagedInterface, IUnmanagedInterface
Implements
Inherited Members

Constructors

IComponentList(nint)

Initializes a new instance of the IComponentList struct.

public IComponentList(nint handle)

Parameters

handle nint

A pointer to the unmanaged interface.

Properties

Handle

Gets the handle to the unmanaged interface instance.

public nint Handle { get; }

Property Value

nint

HasValue

Gets a value indicating whether the pointer has a value.

public bool HasValue { get; }

Property Value

bool

Methods

Equals(IComponentList)

public bool Equals(IComponentList other)

Parameters

other IComponentList

Returns

bool

Equals(object?)

public override bool Equals(object? other)

Parameters

other object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

QueryComponent(UID)

Gets a component by its identifier.

public IComponent QueryComponent(UID id)

Parameters

id UID

The identifier of the component.

Returns

IComponent

The component or null if not found.

QueryComponent<T>()

Gets a component by its type.

public T QueryComponent<T>() where T : unmanaged, IComponent.IManagedInterface

Returns

T

The component or null if not found.

Type Parameters

T

The type of the component.

Operators

operator ==(IComponentList, object?)

Determines whether the specified values are equal.

public static bool operator ==(IComponentList lhs, object? rhs)

Parameters

lhs IComponentList

The value on the left side of the operator.

rhs object

The value on the right side of the operator.

Returns

bool

true if the values are equal; otherwise, false.

operator !=(IComponentList, object?)

Determines whether the specified values are not equal.

public static bool operator !=(IComponentList lhs, object? rhs)

Parameters

lhs IComponentList

The value on the left side of the operator.

rhs object

The value on the right side of the operator.

Returns

bool

true if the values are not equal; otherwise, false.