2using System.Collections.Generic;
4using System.Threading.Tasks;
6using Microsoft.Extensions.Logging;
36 protected ILogger<GitRemoteFeaturesBase>
Logger {
get; }
50 Logger = logger ??
throw new ArgumentNullException(nameof(logger));
51 ArgumentNullException.ThrowIfNull(remoteUrl);
65 CancellationToken cancellationToken)
67 ArgumentNullException.ThrowIfNull(parameters);
68 ArgumentNullException.ThrowIfNull(repositorySettings);
70 Models.TestMerge? result;
73 Logger.LogTrace(
"Using cache for test merge #{testMergeNumber}", parameters.
Number);
77 Logger.LogTrace(
"Retrieving metadata for test merge #{testMergeNumber}...", parameters.
Number);
78 result = await
GetTestMergeImpl(parameters, repositorySettings, cancellationToken);
81 Logger.LogError(
"Race condition on adding test merge #{testMergeNumber}!", parameters.
Number);
97 CancellationToken cancellationToken);
Represents configurable settings for a git repository.
Parameters for creating a TestMerge.
int Number
The number of the test merge source.
Base class for implementing IGitRemoteFeatures.
abstract ValueTask< Models.TestMerge > GetTestMergeImpl(TestMergeParameters parameters, RepositorySettings repositorySettings, CancellationToken cancellationToken)
Implementation of GetTestMerge(TestMergeParameters, RepositorySettings, CancellationToken).
readonly Dictionary< TestMergeParameters, Models.TestMerge > cachedLookups
Cache of created Models.TestMerges.
abstract string TestMergeLocalBranchNameFormatter
Get.
string RemoteRepositoryOwner
If RemoteGitProvider is not RemoteGitProvider.Unknown this will be set with the owner of the reposito...
async ValueTask< Models.TestMerge > GetTestMerge(TestMergeParameters parameters, RepositorySettings repositorySettings, CancellationToken cancellationToken)
Retrieve the Models.TestMerge representation of given test merge parameters . A ValueTask<TResult> re...
GitRemoteFeaturesBase(ILogger< GitRemoteFeaturesBase > logger, Uri remoteUrl)
Initializes a new instance of the GitRemoteFeaturesBase class.
ILogger< GitRemoteFeaturesBase > Logger
The ILogger for the GitRemoteFeaturesBase.
string RemoteRepositoryName
If RemoteGitProvider is not RemoteGitProvider.Unknown this will be set with the name of the repositor...
abstract string TestMergeRefSpecFormatter
Gets a formatter string which creates the remote refspec for fetching the HEAD of passed in test merg...
Provides features for remote git services.
RemoteGitProvider
Indicates the remote git host.