Show / Hide Table of Contents

Class BanService

Allows you to ban IPs or serials

Inheritance
object
BanService
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: SlipeServer.Server.Services
Assembly: SlipeServer.Server.dll
Syntax
public class BanService

Constructors

| Edit this page View Source

BanService(IBanRepository, IElementCollection)

Allows you to ban IPs or serials

Declaration
public BanService(IBanRepository banRepository, IElementCollection elementCollection)
Parameters
Type Name Description
IBanRepository banRepository
IElementCollection elementCollection

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
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX