tgstation-server 5.12.7
The /tg/station 13 server suite
Loading...
Searching...
No Matches
ChatManagerFactory.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Linq;
4
5using Microsoft.Extensions.Logging;
6
10
12{
15 {
19 readonly ILoggerFactory loggerFactory;
20
25
30
40 ILoggerFactory loggerFactory)
41 {
42 this.providerFactory = providerFactory ?? throw new ArgumentNullException(nameof(providerFactory));
43 this.serverControl = serverControl ?? throw new ArgumentNullException(nameof(serverControl));
44 this.loggerFactory = loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory));
45 }
46
49 ICommandFactory commandFactory,
50 IEnumerable<Models.ChatBot> initialChatBots)
51 => new ChatManager(
53 commandFactory,
56 loggerFactory.CreateLogger<ChatManager>(),
57 initialChatBots.Where(x => x.Enabled.Value));
58 }
59}
readonly IServerControl serverControl
The IServerControl for the ChatManagerFactory.
IChatManager CreateChatManager(ICommandFactory commandFactory, IEnumerable< Models.ChatBot > initialChatBots)
Create a IChatManager. A new IChatManager.
ChatManagerFactory(IProviderFactory providerFactory, IServerControl serverControl, ILoggerFactory loggerFactory)
Initializes a new instance of the ChatManagerFactory class.
readonly ILoggerFactory loggerFactory
The ILoggerFactory for the ChatManagerFactory.
readonly IProviderFactory providerFactory
The IProviderFactory for the ChatManagerFactory.
For managing connected chat services.
Definition: IChatManager.cs:15
Represents a service that may take an updated Host assembly and run it, stopping the current assembly...