Table of Contents

Class BanEntry

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

Represents an entry in the ban list.

[NativeMarshalling(typeof(BanEntryMarshaller))]
public record BanEntry : IEquatable<BanEntry>
Inheritance
BanEntry
Implements
Inherited Members

Constructors

BanEntry(BanEntry)

protected BanEntry(BanEntry original)

Parameters

original BanEntry

BanEntry(string)

Initializes a new instance of the BanEntry class with only an address. The ban time is set to the current UTC time, and the name and reason are left null.

public BanEntry(string address)

Parameters

address string

The IP address of the banned player.

BanEntry(string, DateTimeOffset, string?, string?)

Represents an entry in the ban list.

public BanEntry(string Address, DateTimeOffset Time, string? Name, string? Reason)

Parameters

Address string

The IP address of the banned player.

Time DateTimeOffset

The time when the ban was issued.

Name string

The name of the banned player, if available.

Reason string

The reason for the ban, if provided.

Properties

Address

The IP address of the banned player.

public string Address { get; init; }

Property Value

string

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Name

The name of the banned player, if available.

public string? Name { get; init; }

Property Value

string

Reason

The reason for the ban, if provided.

public string? Reason { get; init; }

Property Value

string

Time

The time when the ban was issued.

public DateTimeOffset Time { get; init; }

Property Value

DateTimeOffset

Methods

Deconstruct(out string, out DateTimeOffset, out string?, out string?)

public void Deconstruct(out string Address, out DateTimeOffset Time, out string? Name, out string? Reason)

Parameters

Address string
Time DateTimeOffset
Name string
Reason string

Equals(BanEntry?)

public virtual bool Equals(BanEntry? other)

Parameters

other BanEntry

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(BanEntry?, BanEntry?)

public static bool operator ==(BanEntry? left, BanEntry? right)

Parameters

left BanEntry
right BanEntry

Returns

bool

operator !=(BanEntry?, BanEntry?)

public static bool operator !=(BanEntry? left, BanEntry? right)

Parameters

left BanEntry
right BanEntry

Returns

bool