3using System.Threading.Tasks;
5using Microsoft.Extensions.Logging;
6using Microsoft.Extensions.Options;
160#pragma warning disable CA1502
188 public InstanceFactory(
211 IOptions<GeneralConfiguration> generalConfigurationOptions,
212 IOptions<SessionConfiguration> sessionConfigurationOptions)
236 generalConfiguration = generalConfigurationOptions?.Value ??
throw new ArgumentNullException(nameof(generalConfigurationOptions));
237 sessionConfiguration = sessionConfigurationOptions?.Value ??
throw new ArgumentNullException(nameof(sessionConfigurationOptions));
239#pragma warning restore CA1502
244 ArgumentNullException.ThrowIfNull(metadata);
251#pragma warning disable CA1506
254 ArgumentNullException.ThrowIfNull(bridgeRegistrar);
255 ArgumentNullException.ThrowIfNull(metadata);
265 var configurationIoManager =
new ResolvingIOManager(instanceIoManager,
"Configuration");
267 var configuration =
new StaticFiles.Configuration(
268 configurationIoManager,
317 diagnosticsIOManager,
335 sessionControllerFactory,
337 diagnosticsIOManager,
341 metadata.DreamDaemonSettings!);
344 eventConsumer.SetWatchdog(watchdog);
345 commandFactory.SetWatchdog(watchdog);
352 sessionControllerFactory,
389 await chatManager.DisposeAsync();
395 dmbFactory.Dispose();
401 repoManager.Dispose();
405#pragma warning restore CA1506
readonly IDatabaseContextFactory databaseContextFactory
The IDatabaseContextFactory for the InstanceFactory.
readonly ITopicClientFactory topicClientFactory
The ITopicClientFactory for the InstanceFactory.
readonly ISynchronousIOManager synchronousIOManager
The ISynchronousIOManager for the InstanceFactory.
readonly IPlatformIdentifier platformIdentifier
The IPlatformIdentifier for the InstanceFactory.
readonly SessionConfiguration sessionConfiguration
The SessionConfiguration for the InstanceFactory.
readonly IEngineInstaller engineInstaller
The IEngineInstaller for the InstanceFactory.
readonly IIOManager ioManager
The IIOManager for the InstanceFactory.
readonly IAsyncDelayer asyncDelayer
The IAsyncDelayer for the InstanceFactory.
readonly IProcessExecutor processExecutor
The IProcessExecutor for the InstanceFactory.
readonly IJobManager jobManager
The IJobManager for the InstanceFactory.
readonly IChatManagerFactory chatFactory
The IChatManagerFactory for the InstanceFactory.
readonly IRepositoryManagerFactory repositoryManagerFactory
The IRepositoryManagerFactory for the InstanceFactory.
readonly IServerPortProvider serverPortProvider
The IServerPortProvider for the InstanceFactory.
readonly GeneralConfiguration generalConfiguration
The GeneralConfiguration for the InstanceFactory.
Task StartAsync(CancellationToken cancellationToken)
Task StopAsync(CancellationToken cancellationToken)
readonly IWatchdogFactory watchdogFactory
The IWatchdogFactory for the InstanceFactory.
static ResolvingIOManager CreateGameIOManager(IIOManager instanceIOManager)
Create the IIOManager pointing to the "Game" directory of a given instanceIOManager .
readonly IAssemblyInformationProvider assemblyInformationProvider
The IAssemblyInformationProvider for the InstanceFactory.
ResolvingIOManager CreateInstanceIOManager(Models.Instance metadata)
Create the IIOManager for a given set of instance metadata .
readonly IPostWriteHandler postWriteHandler
The IPostWriteHandler for the InstanceFactory.
IIOManager CreateGameIOManager(Models.Instance metadata)
Create an IIOManager that resolves to the "Game" directory of the Models.Instance defined by metadata...
readonly IDotnetDumpService dotnetDumpService
The IDotnetDumpService for the InstanceFactory.
readonly ICryptographySuite cryptographySuite
The ICryptographySuite for the InstanceFactory.
async ValueTask< IInstance > CreateInstance(IBridgeRegistrar bridgeRegistrar, Models.Instance metadata)
Create an IInstance.A ValueTask<TResult> resulting in a new IInstance.
readonly IFileTransferTicketProvider fileTransferService
The IFileTransferTicketProvider for the InstanceFactory.
readonly INetworkPromptReaper networkPromptReaper
The INetworkPromptReaper for the InstanceFactory.
readonly IFilesystemLinkFactory linkFactory
The IFilesystemLinkFactory for the InstanceFactory.
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the InstanceFactory.
readonly ILoggerFactory loggerFactory
The ILoggerFactory for the InstanceFactory.
async ValueTask DisposeAsync()
General configuration options.
Configuration options for the game sessions.
An IIOManager that resolve relative paths from another IIOManager to a subdirectory of that.
For creating IChatManagers.
IChatManager CreateChatManager(ICommandFactory commandFactory, IEnumerable< Models.ChatBot > initialChatBots)
Create a IChatManager.
Factory for creating IRemoteDeploymentManagers.
For downloading and installing game engines for a given system.
Task CleanCache(CancellationToken cancellationToken)
Attempts to cleans the engine's cache folder for the system.
Factory for creating IInstances.
Registers IBridgeHandlers.
Factory for creating IRepositoryManagers.
IRepositoryManager CreateRepositoryManager(IIOManager ioManager, IEventConsumer eventConsumer)
Create a IRepositoryManager.
Factory for ITopicClients.
IWatchdog CreateWatchdog(IChatManager chat, IDmbFactory dmbFactory, ISessionPersistor sessionPersistor, ISessionControllerFactory sessionControllerFactory, IIOManager gameIOManager, IIOManager diagnosticsIOManager, IEventConsumer eventConsumer, IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory, Api.Models.Instance instance, DreamDaemonSettings settings)
Creates a IWatchdog.
Provides access to the server's HttpApiPort.
Factory for scoping usage of IDatabaseContexts. Meant for use by Components.
For creating filesystem symbolic links.
Interface for using filesystems.
Handles changing file modes/permissions after writing.
For accessing the disk in a synchronous manner.
Manages the runtime of Jobs.
Contains various cryptographic functions.
Service for managing the dotnet-dump installation.
On Windows, DreamDaemon will show an unskippable prompt when using /world/proc/OpenPort()....
Service for temporarily storing files to be downloaded or uploaded.
For waiting asynchronously.