tgstation-server 6.12.0
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
11
13{
16 {
20 readonly ILoggerFactory loggerFactory;
21
26
31
41 ILoggerFactory loggerFactory)
42 {
43 this.providerFactory = providerFactory ?? throw new ArgumentNullException(nameof(providerFactory));
44 this.serverControl = serverControl ?? throw new ArgumentNullException(nameof(serverControl));
45 this.loggerFactory = loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory));
46 }
47
50 ICommandFactory commandFactory,
51 IEnumerable<Models.ChatBot> initialChatBots)
52 => new ChatManager(
54 commandFactory,
57 loggerFactory.CreateLogger<ChatManager>(),
58 initialChatBots.Where(x => x.Require(y => y.Enabled)));
59 }
60}
readonly IServerControl serverControl
The IServerControl for the ChatManagerFactory.
IChatManager CreateChatManager(ICommandFactory commandFactory, IEnumerable< Models.ChatBot > initialChatBots)
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.
Represents a service that may take an updated Host assembly and run it, stopping the current assembly...