tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
RepostoryManagerFactory.cs
Go to the documentation of this file.
1using System;
2using System.Threading;
3using System.Threading.Tasks;
4
5using Microsoft.Extensions.Logging;
6using Microsoft.Extensions.Options;
7
11
13{
16 {
21
26
31
36
40 readonly ILoggerFactory loggerFactory;
41
46
61 ILoggerFactory loggerFactory,
62 IOptions<GeneralConfiguration> generalConfigurationOptions)
63 {
64 this.repositoryFactory = repositoryFactory ?? throw new ArgumentNullException(nameof(repositoryFactory));
65 this.repositoryCommands = repositoryCommands ?? throw new ArgumentNullException(nameof(repositoryCommands));
66 this.postWriteHandler = postWriteHandler ?? throw new ArgumentNullException(nameof(postWriteHandler));
67 this.gitRemoteFeaturesFactory = gitRemoteFeaturesFactory ?? throw new ArgumentNullException(nameof(gitRemoteFeaturesFactory));
68 this.loggerFactory = loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory));
69 generalConfiguration = generalConfigurationOptions?.Value ?? throw new ArgumentNullException(nameof(generalConfigurationOptions));
70 }
71
74 => new RepositoryManager(
77 ioManager,
78 eventConsumer,
81 loggerFactory.CreateLogger<Repository>(),
82 loggerFactory.CreateLogger<RepositoryManager>(),
84
86 public Task StartAsync(CancellationToken cancellationToken)
87 {
89 return Task.CompletedTask;
90 }
91
93 public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
94
99 }
100}
readonly ILoggerFactory loggerFactory
The ILoggerFactory for the RepostoryManagerFactory.
readonly GeneralConfiguration generalConfiguration
The GeneralConfiguration for the RepostoryManagerFactory.
readonly IPostWriteHandler postWriteHandler
The IPostWriteHandler for the RepostoryManagerFactory.
void CheckSystemCompatibility()
Test that the repositoryFactory is functional.
readonly ILibGit2RepositoryFactory repositoryFactory
The ILibGit2RepositoryFactory for the RepostoryManagerFactory.
readonly IGitRemoteFeaturesFactory gitRemoteFeaturesFactory
The IGitRemoteFeaturesFactory for the RepostoryManagerFactory.
RepostoryManagerFactory(ILibGit2RepositoryFactory repositoryFactory, ILibGit2Commands repositoryCommands, IPostWriteHandler postWriteHandler, IGitRemoteFeaturesFactory gitRemoteFeaturesFactory, ILoggerFactory loggerFactory, IOptions< GeneralConfiguration > generalConfigurationOptions)
Initializes a new instance of the RepostoryManagerFactory class.
readonly ILibGit2Commands repositoryCommands
The ILibGit2Commands for the RepostoryManagerFactory.
IRepositoryManager CreateRepositoryManager(IIOManager ioManager, IEventConsumer eventConsumer)
Create a IRepositoryManager.A new IRepositoryManager.
Consumes EventTypes and takes the appropriate actions.
For low level interactions with a LibGit2Sharp.IRepository.
void CreateInMemory()
Create and destory an in-memeory LibGit2Sharp.IRepository.
Interface for using filesystems.
Definition IIOManager.cs:13
Handles changing file modes/permissions after writing.