Table of Contents

Struct INetworkQueryExtension

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

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

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

Constructors

INetworkQueryExtension(nint)

Initializes a new instance of the INetworkQueryExtension struct.

public INetworkQueryExtension(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

AddRule(string, string)

Adds a query rule to the server's query response.

public bool AddRule(string rule, string value)

Parameters

rule string

The name of the rule.

value string

The value of the rule.

Returns

bool

true if the rule was added successfully; otherwise, false.

Equals(INetworkQueryExtension)

public bool Equals(INetworkQueryExtension other)

Parameters

other INetworkQueryExtension

Returns

bool

Equals(object?)

public override bool Equals(object? other)

Parameters

other object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

IsValidRule(string)

Checks if a query rule is valid.

public bool IsValidRule(string rule)

Parameters

rule string

The name of the rule to check.

Returns

bool

true if the rule is valid; otherwise, false.

RemoveRule(string)

Removes a query rule from the server's query response.

public bool RemoveRule(string rule)

Parameters

rule string

The name of the rule to remove.

Returns

bool

true if the rule was removed successfully; otherwise, false.

Operators

operator ==(INetworkQueryExtension, object?)

Determines whether the specified values are equal.

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

Parameters

lhs INetworkQueryExtension

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.

explicit operator INetworkQueryExtension(IExtension)

public static explicit operator INetworkQueryExtension(IExtension value)

Parameters

value IExtension

The IExtension to cast.

Returns

INetworkQueryExtension

The converted INetworkQueryExtension.

explicit operator IExtension(INetworkQueryExtension)

public static explicit operator IExtension(INetworkQueryExtension value)

Parameters

value INetworkQueryExtension

The INetworkQueryExtension to cast.

Returns

IExtension

The converted IExtension.

operator !=(INetworkQueryExtension, object?)

Determines whether the specified values are not equal.

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

Parameters

lhs INetworkQueryExtension

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.

Explicit Interface Implementations

ExtensionId

Gets the identifier of the extension type. IPool<T>

static UID ExtensionId { get; }

Returns

UID