2using System.Collections.Generic;
4using System.Threading.Tasks;
6using Microsoft.Extensions.Logging;
35 protected ILogger<GitRemoteFeaturesBase>
Logger {
get; }
49 Logger = logger ??
throw new ArgumentNullException(nameof(logger));
50 ArgumentNullException.ThrowIfNull(remoteUrl);
64 CancellationToken cancellationToken)
66 ArgumentNullException.ThrowIfNull(parameters);
67 ArgumentNullException.ThrowIfNull(repositorySettings);
69 Models.TestMerge? result;
72 Logger.LogTrace(
"Using cache for test merge #{testMergeNumber}", parameters.
Number);
76 Logger.LogTrace(
"Retrieving metadata for test merge #{testMergeNumber}...", parameters.
Number);
77 result = await
GetTestMergeImpl(parameters, repositorySettings, cancellationToken);
80 Logger.LogError(
"Race condition on adding test merge #{testMergeNumber}!", parameters.
Number);
96 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.
readonly Dictionary< TestMergeParameters, Models.TestMerge > cachedLookups
Cache of created Models.TestMerges.
string TestMergeLocalBranchNameFormatter
Get.
ValueTask< Models.TestMerge > GetTestMergeImpl(TestMergeParameters parameters, RepositorySettings repositorySettings, CancellationToken cancellationToken)
Implementation of GetTestMerge(TestMergeParameters, RepositorySettings, CancellationToken).
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> res...
string TestMergeRefSpecFormatter
Gets a formatter string which creates the remote refspec for fetching the HEAD of passed in test merg...
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...
Provides features for remote git services.
RemoteGitProvider
Indicates the remote git host.