Struct INetworkQueryExtension
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
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
AddRule(string, string)
Adds a query rule to the server's query response.
public bool AddRule(string rule, string value)
Parameters
Returns
- bool
trueif the rule was added successfully; otherwise,false.
Equals(INetworkQueryExtension)
public bool Equals(INetworkQueryExtension other)
Parameters
otherINetworkQueryExtension
Returns
Equals(object?)
public override bool Equals(object? other)
Parameters
otherobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
IsValidRule(string)
Checks if a query rule is valid.
public bool IsValidRule(string rule)
Parameters
rulestringThe name of the rule to check.
Returns
- bool
trueif the rule is valid; otherwise,false.
RemoveRule(string)
Removes a query rule from the server's query response.
public bool RemoveRule(string rule)
Parameters
rulestringThe name of the rule to remove.
Returns
- bool
trueif 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
lhsINetworkQueryExtensionThe 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.
explicit operator INetworkQueryExtension(IExtension)
Casts the IExtension to a INetworkQueryExtension.
public static explicit operator INetworkQueryExtension(IExtension value)
Parameters
valueIExtensionThe IExtension to cast.
Returns
- INetworkQueryExtension
The converted INetworkQueryExtension.
explicit operator IExtension(INetworkQueryExtension)
Casts the INetworkQueryExtension to a IExtension.
public static explicit operator IExtension(INetworkQueryExtension value)
Parameters
valueINetworkQueryExtensionThe 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
lhsINetworkQueryExtensionThe 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.
Explicit Interface Implementations
ExtensionId
Gets the identifier of the extension type. IPool<T>
static UID ExtensionId { get; }