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);
60 CancellationToken cancellationToken)
62 ArgumentNullException.ThrowIfNull(parameters);
63 ArgumentNullException.ThrowIfNull(repositorySettings);
68 Logger.LogTrace(
"Using cache for test merge #{0}", parameters.
Number);
72 Logger.LogTrace(
"Retrieving metadata for test merge #{0}...", parameters.
Number);
73 result = await
GetTestMergeImpl(parameters, repositorySettings, cancellationToken);
76 Logger.LogError(
"Race condition on adding test merge #{0}!", parameters.
Number);
92 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.
abstract Task< Models.TestMerge > GetTestMergeImpl(TestMergeParameters parameters, RepositorySettings repositorySettings, CancellationToken cancellationToken)
Implementation of GetTestMerge(TestMergeParameters, RepositorySettings, CancellationToken).
abstract string TestMergeLocalBranchNameFormatter
Get.
abstract string RemoteRepositoryOwner
If RemoteGitProvider is not RemoteGitProvider.Unknown this will be set with the owner of the reposito...
abstract string RemoteRepositoryName
If RemoteGitProvider is not RemoteGitProvider.Unknown this will be set with the name of the repositor...
GitRemoteFeaturesBase(ILogger< GitRemoteFeaturesBase > logger, Uri remoteUrl)
Initializes a new instance of the GitRemoteFeaturesBase class.
async Task< Models.TestMerge > GetTestMerge(TestMergeParameters parameters, RepositorySettings repositorySettings, CancellationToken cancellationToken)
Retrieve the Models.TestMerge representation of given test merge parameters . A Task<TResult> resulti...
ILogger< GitRemoteFeaturesBase > Logger
The ILogger for the GitRemoteFeaturesBase.
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.