Table of Contents

Interface IChatProvider

Namespace
BSGameLib.Server
Assembly
BSGameLib.Server.dll

Stores and finds the server's chat messages.

public interface IChatProvider

Properties

All

Every stored message, oldest first. The provider keeps the most recent 10,000.

IReadOnlyCollection<IChatMessage> All { get; }

Property Value

IReadOnlyCollection<IChatMessage>

Methods

Add(string, DateTime, string)

Stores a message on channel with timestamp.

void Add(string channel, DateTime timestamp, string message)

Parameters

channel string
timestamp DateTime
message string

Add(string, string)

Stores a message on channel, timestamped now in UTC.

void Add(string channel, string message)

Parameters

channel string
message string

GetByChannel(string)

Returns the stored messages on channel, oldest first.

IReadOnlyCollection<IChatMessage> GetByChannel(string channel)

Parameters

channel string

Returns

IReadOnlyCollection<IChatMessage>

GetByDateRange(DateTime?, DateTime?)

Returns the stored messages with timestamps from beginDate to endDate, inclusive. A null bound is open.

IReadOnlyCollection<IChatMessage> GetByDateRange(DateTime? beginDate, DateTime? endDate)

Parameters

beginDate DateTime?
endDate DateTime?

Returns

IReadOnlyCollection<IChatMessage>