Show / Hide Table of Contents

Class JsonFileBanRepository

Inheritance
object
JsonFileBanRepository
Implements
IBanRepository
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: SlipeServer.Server.Bans
Assembly: SlipeServer.Server.dll
Syntax
public class JsonFileBanRepository : IBanRepository

Constructors

| Edit this page View Source

JsonFileBanRepository(string)

Declaration
public JsonFileBanRepository(string filepath = "bans.json")
Parameters
Type Name Description
string filepath

Methods

| Edit this page View Source

AddBan(string?, IPAddress?, DateTime?, string?, string?, string?)

Declaration
public Ban AddBan(string? serial, IPAddress? ipAddress, DateTime? expiryTimeUtc = null, string? reason = null, string? bannedPlayerName = null, string? bannerName = null)
Parameters
Type Name Description
string serial
IPAddress ipAddress
DateTime? expiryTimeUtc
string reason
string bannedPlayerName
string bannerName
Returns
Type Description
Ban
| Edit this page View Source

GetBans()

Declaration
public IEnumerable<Ban> GetBans()
Returns
Type Description
IEnumerable<Ban>
| Edit this page View Source

IsIpOrSerialBanned(string?, IPAddress?, out Ban?)

Declaration
public bool IsIpOrSerialBanned(string? serial, IPAddress? ipAddress, out Ban? ban)
Parameters
Type Name Description
string serial
IPAddress ipAddress
Ban ban
Returns
Type Description
bool
| Edit this page View Source

RemoveBan(Ban)

Declaration
public void RemoveBan(Ban ban)
Parameters
Type Name Description
Ban ban
| Edit this page View Source

RemoveBan(Guid)

Declaration
public void RemoveBan(Guid id)
Parameters
Type Name Description
Guid id
| Edit this page View Source

RemoveBans(string?, IPAddress?)

Declaration
public void RemoveBans(string? serial, IPAddress? ipAddress)
Parameters
Type Name Description
string serial
IPAddress ipAddress

Implements

IBanRepository
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX