2using System.Diagnostics.CodeAnalysis;
18 [MemberNotNullWhen(
true, nameof(
Owner))]
19 [MemberNotNullWhen(
true, nameof(
Name))]
35 public string?
Name {
get; }
53 Owner = owner ??
throw new ArgumentNullException(nameof(owner));
54 Name = name ??
throw new ArgumentNullException(nameof(name));
63 ArgumentNullException.ThrowIfNull(gitRemoteInformation);
65 throw new ArgumentException(
"Cannot cast IGitRemoteInformation of Unknown provider to RepositoryIdentifier!", nameof(gitRemoteInformation));
75 : $
"ID {RepositoryId.Value}";
Identifies a repository either by its RepositoryId or Owner and Name.
override string ToString()
RepositoryIdentifier(string owner, string name)
Initializes a new instance of the RepositoryIdentifier class.
RepositoryIdentifier(IGitRemoteInformation gitRemoteInformation)
Initializes a new instance of the RepositoryIdentifier class.
bool IsSlug
If the RepositoryIdentifier is using Owner and Name.
long? RepositoryId
The repository ID.
string? Name
The repository's name.
string? Owner
The repository's owning entity.
RepositoryIdentifier(long repositoryId)
Initializes a new instance of the RepositoryIdentifier class.
RemoteGitProvider
Indicates the remote git host.