3using System.Threading.Tasks;
5using Microsoft.Extensions.Logging;
6using Microsoft.Extensions.Options;
155#pragma warning disable CA1502
182 public InstanceFactory(
204 IOptions<GeneralConfiguration> generalConfigurationOptions,
205 IOptions<SessionConfiguration> sessionConfigurationOptions)
228 generalConfiguration = generalConfigurationOptions?.Value ??
throw new ArgumentNullException(nameof(generalConfigurationOptions));
229 sessionConfiguration = sessionConfigurationOptions?.Value ??
throw new ArgumentNullException(nameof(sessionConfigurationOptions));
231#pragma warning restore CA1502
236 ArgumentNullException.ThrowIfNull(metadata);
243#pragma warning disable CA1506
246 ArgumentNullException.ThrowIfNull(bridgeRegistrar);
247 ArgumentNullException.ThrowIfNull(metadata);
257 var configurationIoManager =
new ResolvingIOManager(instanceIoManager,
"Configuration");
259 var configuration =
new StaticFiles.Configuration(
260 configurationIoManager,
304 diagnosticsIOManager,
321 sessionControllerFactory,
323 diagnosticsIOManager,
327 metadata.DreamDaemonSettings!);
330 eventConsumer.SetWatchdog(watchdog);
331 commandFactory.SetWatchdog(watchdog);
338 sessionControllerFactory,
375 await chatManager.DisposeAsync();
381 dmbFactory.Dispose();
387 repoManager.Dispose();
391#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 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.
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.