Class BanEntry
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
originalBanEntry
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
addressstringThe 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
AddressstringThe IP address of the banned player.
TimeDateTimeOffsetThe time when the ban was issued.
NamestringThe name of the banned player, if available.
ReasonstringThe reason for the ban, if provided.
Properties
Address
The IP address of the banned player.
public string Address { get; init; }
Property Value
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
Name
The name of the banned player, if available.
public string? Name { get; init; }
Property Value
Reason
The reason for the ban, if provided.
public string? Reason { get; init; }
Property Value
Time
The time when the ban was issued.
public DateTimeOffset Time { get; init; }
Property Value
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
AddressstringTimeDateTimeOffsetNamestringReasonstring
Equals(BanEntry?)
public virtual bool Equals(BanEntry? other)
Parameters
otherBanEntry
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(BanEntry?, BanEntry?)
public static bool operator ==(BanEntry? left, BanEntry? right)
Parameters
Returns
operator !=(BanEntry?, BanEntry?)
public static bool operator !=(BanEntry? left, BanEntry? right)