tgstation-server  4.4.0
The /tg/station 13 server suite
ChatManagerFactory.cs
Go to the documentation of this file.
1 using Microsoft.Extensions.Logging;
2 using System;
3 using System.Collections.Generic;
7 using Tgstation.Server.Host.IO;
8 
9 namespace Tgstation.Server.Host.Components.Chat
10 {
13  {
17  readonly ILoggerFactory loggerFactory;
18 
23 
28 
33 
41  public ChatManagerFactory(IProviderFactory providerFactory, IServerControl serverControl, IAsyncDelayer asyncDelayer, ILoggerFactory loggerFactory)
42  {
43  this.providerFactory = providerFactory ?? throw new ArgumentNullException(nameof(providerFactory));
44  this.serverControl = serverControl ?? throw new ArgumentNullException(nameof(serverControl));
45  this.asyncDelayer = asyncDelayer ?? throw new ArgumentNullException(nameof(asyncDelayer));
46  this.loggerFactory = loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory));
47  }
48 
50  public IChatManager CreateChatManager(IIOManager ioManager, ICommandFactory commandFactory, IEnumerable<Models.ChatBot> initialChatBots) => new ChatManager(providerFactory, ioManager, commandFactory, serverControl, asyncDelayer, loggerFactory, loggerFactory.CreateLogger<ChatManager>(), initialChatBots);
51  }
52 }
readonly IAsyncDelayer asyncDelayer
The IAsyncDelayer for the ChatManagerFactory
For managing connected chat services
Definition: IChatManager.cs:13
readonly IProviderFactory providerFactory
The IProviderFactory for the ChatManagerFactory
ChatManagerFactory(IProviderFactory providerFactory, IServerControl serverControl, IAsyncDelayer asyncDelayer, ILoggerFactory loggerFactory)
Construct a ChatManagerFactory
readonly ILoggerFactory loggerFactory
The ILoggerFactory for the ChatManagerFactory
Interface for using filesystems
Definition: IIOManager.cs:11
readonly IServerControl serverControl
The IServerControl for the ChatManagerFactory
Represents a service that may take an updated Host assembly and run it, stopping the current assembly...