Skip to content

Commit

Permalink
Replace record types with struct + interface
Browse files Browse the repository at this point in the history
  • Loading branch information
PMExtra committed Nov 1, 2023
1 parent 11e2c1e commit bdcaa24
Show file tree
Hide file tree
Showing 48 changed files with 113 additions and 89 deletions.
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/ClusterClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal sealed class ClusterClient : ClientBase, IClusterClient
public ClusterClient(ClientContext context, ProjectId projectId)
: base(context)
{
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter).Id;
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter()).Id;
}

public IEnumerable<ClusterInfo> All => throw new NotImplementedException();
Expand Down
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/CommitClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal sealed class CommitClient : ClientBase, ICommitClient
public CommitClient(ClientContext context, ProjectId projectId)
: base(context)
{
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter).Id;
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter()).Id;
}

public Commit Create(CommitCreate commit)
Expand Down
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/CommitStatusClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal sealed class CommitStatusClient : ClientBase, ICommitStatusClient
public CommitStatusClient(ClientContext context, ProjectId projectId)
: base(context)
{
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter).Id;
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter()).Id;
}

public CommitStatusCreate AddOrUpdate(CommitStatusCreate status)
Expand Down
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/EnvironmentClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal sealed class EnvironmentClient : ClientBase, IEnvironmentClient
public EnvironmentClient(ClientContext context, ProjectId projectId)
: base(context)
{
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter).Id;
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter()).Id;
}

public IEnumerable<EnvironmentInfo> All => throw new NotImplementedException();
Expand Down
4 changes: 2 additions & 2 deletions NGitLab.Mock/Clients/EventClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ public EventClient(ClientContext context)
{
}

public EventClient(ClientContext context, int? userId = null, ProjectId projectId = null)
public EventClient(ClientContext context, int? userId = null, ProjectId? projectId = null)
: base(context)
{
_userId = userId;
_projectId = projectId is null ? null : Server.AllProjects.FindProject(projectId.ValueAsUriParameter).Id;
_projectId = projectId.HasValue ? Server.AllProjects.FindProject(projectId.ValueAsUriParameter()).Id : null;
}

IEnumerable<Models.Event> IEventClient.Get(EventQuery query)
Expand Down
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/GroupBadgeClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal sealed class GroupBadgeClient : ClientBase, IGroupBadgeClient
public GroupBadgeClient(ClientContext context, GroupId groupId)
: base(context)
{
_groupId = Server.AllGroups.FindGroup(groupId.ValueAsUriParameter).Id;
_groupId = Server.AllGroups.FindGroup(groupId.ValueAsUriParameter()).Id;
}

public Models.Badge this[int id]
Expand Down
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/GroupSearchClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public GroupSearchClient(ClientContext context, GroupId groupId)
: base(context)
{
_context = context;
_groupId = Server.AllGroups.FindGroup(groupId.ValueAsUriParameter).Id;
_groupId = Server.AllGroups.FindGroup(groupId.ValueAsUriParameter()).Id;
}

public GitLabCollectionResponse<SearchBlob> GetBlobsAsync(SearchQuery query)
Expand Down
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/GroupVariableClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal sealed class GroupVariableClient : ClientBase, IGroupVariableClient
public GroupVariableClient(ClientContext context, GroupId groupId)
: base(context)
{
_groupId = Server.AllGroups.FindGroup(groupId.ValueAsUriParameter).Id;
_groupId = Server.AllGroups.FindGroup(groupId.ValueAsUriParameter()).Id;
}

public Variable this[string key] => throw new NotImplementedException();
Expand Down
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/JobClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ internal sealed class JobClient : ClientBase, IJobClient
public JobClient(ClientContext context, ProjectId projectId)
: base(context)
{
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter).Id;
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter()).Id;
}

public Models.Job Get(int jobId)
Expand Down
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/MergeRequestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public MergeRequestClient(ClientContext context)
public MergeRequestClient(ClientContext context, ProjectId projectId)
: base(context)
{
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter).Id;
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter()).Id;
}

private void AssertProjectId()
Expand Down
6 changes: 3 additions & 3 deletions NGitLab.Mock/Clients/MilestoneClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ internal sealed class MilestoneClient : ClientBase, IMilestoneClient
{
private readonly int _resourceId;

public MilestoneClient(ClientContext context, IdOrNamespacedPath id, MilestoneScope scope)
public MilestoneClient(ClientContext context, IidOrPathAddressable id, MilestoneScope scope)
: base(context)
{
_resourceId = scope switch
{
MilestoneScope.Groups => Server.AllGroups.FindGroup(id.ValueAsUriParameter).Id,
MilestoneScope.Projects => Server.AllProjects.FindProject(id.ValueAsUriParameter).Id,
MilestoneScope.Groups => Server.AllGroups.FindGroup(id.ValueAsUriParameter()).Id,
MilestoneScope.Projects => Server.AllProjects.FindProject(id.ValueAsUriParameter()).Id,
_ => throw new NotSupportedException($"{scope} milestone is not supported yet."),
};
Scope = scope;
Expand Down
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/PipelineClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public PipelineClient(ClientContext context, IJobClient jobClient, ProjectId pro
: base(context)
{
_jobClient = jobClient;
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter).Id;
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter()).Id;
}

public Models.Pipeline this[int id]
Expand Down
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/ProjectBadgeClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal sealed class ProjectBadgeClient : ClientBase, IProjectBadgeClient
public ProjectBadgeClient(ClientContext context, ProjectId projectId)
: base(context)
{
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter).Id;
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter()).Id;
}

public Models.Badge this[int id]
Expand Down
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/ProjectIssueNoteClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal sealed class ProjectIssueNoteClient : ClientBase, IProjectIssueNoteClie
public ProjectIssueNoteClient(ClientContext context, ProjectId projectId)
: base(context)
{
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter).Id;
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter()).Id;
}

public Models.ProjectIssueNote Create(ProjectIssueNoteCreate create)
Expand Down
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/ProjectLevelApprovalRulesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal sealed class ProjectLevelApprovalRulesClient : ClientBase, IProjectLeve
public ProjectLevelApprovalRulesClient(ClientContext context, ProjectId projectId)
: base(context)
{
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter).Id;
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter()).Id;
}

public List<ApprovalRule> GetProjectLevelApprovalRules()
Expand Down
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/ProjectSearchClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public ProjectSearchClient(ClientContext context, ProjectId projectId)
: base(context)
{
_context = context;
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter).Id;
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter()).Id;
}

public GitLabCollectionResponse<SearchBlob> GetBlobsAsync(SearchQuery query)
Expand Down
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/ProjectVariableClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal sealed class ProjectVariableClient : ClientBase, IProjectVariableClient
public ProjectVariableClient(ClientContext context, ProjectId projectId)
: base(context)
{
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter).Id;
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter()).Id;
}

public Variable this[string key] => throw new NotImplementedException();
Expand Down
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/ProtectedBranchClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal sealed class ProtectedBranchClient : ClientBase, IProtectedBranchClient
public ProtectedBranchClient(ClientContext context, ProjectId projectId)
: base(context)
{
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter).Id;
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter()).Id;
}

public Models.ProtectedBranch GetProtectedBranch(string branchName)
Expand Down
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/ReleaseClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ internal sealed class ReleaseClient : ClientBase, IReleaseClient
public ReleaseClient(ClientContext context, ProjectId projectId)
: base(context)
{
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter).Id;
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter()).Id;
}

public IEnumerable<Models.ReleaseInfo> All
Expand Down
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/RepositoryClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal sealed class RepositoryClient : ClientBase, IRepositoryClient
public RepositoryClient(ClientContext context, ProjectId projectId)
: base(context)
{
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter).Id;
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter()).Id;
}

public ITagClient Tags => new TagClient(Context, _projectId);
Expand Down
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/TriggerClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal sealed class TriggerClient : ClientBase, ITriggerClient
public TriggerClient(ClientContext context, ProjectId projectId)
: base(context)
{
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter).Id;
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter()).Id;
}

public Trigger this[int id] => throw new NotImplementedException();
Expand Down
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/WikiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal sealed class WikiClient : ClientBase, IWikiClient
public WikiClient(ClientContext context, ProjectId projectId)
: base(context)
{
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter).Id;
_projectId = Server.AllProjects.FindProject(projectId.ValueAsUriParameter()).Id;
}

public WikiPage this[string slug] => throw new NotImplementedException();
Expand Down
6 changes: 3 additions & 3 deletions NGitLab/GitLabClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public IEventClient GetProjectEvents(int projectId)
=> GetProjectEvents((long)projectId);

public IEventClient GetProjectEvents(ProjectId projectId)
=> new EventClient(_api, $"projects/{projectId.ValueAsUriParameter}/events");
=> new EventClient(_api, $"projects/{projectId.ValueAsUriParameter()}/events");

public IRepositoryClient GetRepository(int projectId)
=> GetRepository((long)projectId);
Expand Down Expand Up @@ -238,12 +238,12 @@ public ISearchClient GetGroupSearchClient(int groupId)
=> GetGroupSearchClient((long)groupId);

public ISearchClient GetGroupSearchClient(GroupId groupId)
=> new SearchClient(_api, $"/groups/{groupId.ValueAsUriParameter}/search");
=> new SearchClient(_api, $"/groups/{groupId.ValueAsUriParameter()}/search");

public ISearchClient GetProjectSearchClient(int projectId)
=> GetProjectSearchClient((long)projectId);

public ISearchClient GetProjectSearchClient(ProjectId projectId)
=> new SearchClient(_api, $"/projects/{projectId.ValueAsUriParameter}/search");
=> new SearchClient(_api, $"/projects/{projectId.ValueAsUriParameter()}/search");
}
}
2 changes: 1 addition & 1 deletion NGitLab/Impl/ClusterClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public ClusterClient(API api, int projectId)
public ClusterClient(API api, ProjectId projectId)
{
_api = api;
_environmentsPath = $"{Project.Url}/{projectId.ValueAsUriParameter}/clusters";
_environmentsPath = $"{Project.Url}/{projectId.ValueAsUriParameter()}/clusters";
}

public IEnumerable<ClusterInfo> All => _api.Get().GetAll<ClusterInfo>(_environmentsPath);
Expand Down
2 changes: 1 addition & 1 deletion NGitLab/Impl/CommitClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public CommitClient(API api, int projectId)
public CommitClient(API api, ProjectId projectId)
{
_api = api;
var projectPath = $"{Project.Url}/{projectId.ValueAsUriParameter}";
var projectPath = $"{Project.Url}/{projectId.ValueAsUriParameter()}";
_repoPath = $"{projectPath}/repository";
}

Expand Down
2 changes: 1 addition & 1 deletion NGitLab/Impl/CommitStatusClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public CommitStatusClient(API api, ProjectId projectId)
{
_api = api;

var projectPath = $"{Project.Url}/{projectId.ValueAsUriParameter}";
var projectPath = $"{Project.Url}/{projectId.ValueAsUriParameter()}";
_statusCreatePath = $"{projectPath}/statuses";
_statusPath = $"{projectPath}/repository/commits";
}
Expand Down
2 changes: 1 addition & 1 deletion NGitLab/Impl/EnvironmentClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public EnvironmentClient(API api, int projectId)
public EnvironmentClient(API api, ProjectId projectId)
{
_api = api;
_environmentsPath = $"{Project.Url}/{projectId.ValueAsUriParameter}/environments";
_environmentsPath = $"{Project.Url}/{projectId.ValueAsUriParameter()}/environments";
}

public IEnumerable<EnvironmentInfo> All => _api.Get().GetAll<EnvironmentInfo>(_environmentsPath);
Expand Down
2 changes: 1 addition & 1 deletion NGitLab/Impl/GroupBadgeClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace NGitLab.Impl
internal sealed class GroupBadgeClient : BadgeClient, IGroupBadgeClient
{
public GroupBadgeClient(API api, GroupId groupId)
: base(api, $"{Group.Url}/{groupId.ValueAsUriParameter}")
: base(api, $"{Group.Url}/{groupId.ValueAsUriParameter()}")
{
}
}
Expand Down
2 changes: 1 addition & 1 deletion NGitLab/Impl/GroupVariableClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace NGitLab.Impl
internal sealed class GroupVariableClient : VariableClient, IGroupVariableClient
{
public GroupVariableClient(API api, GroupId groupId)
: base(api, $"{Group.Url}/{groupId.ValueAsUriParameter}")
: base(api, $"{Group.Url}/{groupId.ValueAsUriParameter()}")
{
}
}
Expand Down
2 changes: 1 addition & 1 deletion NGitLab/Impl/JobClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public JobClient(API api, int projectId)
public JobClient(API api, ProjectId projectId)
{
_api = api;
_jobsPath = $"{Project.Url}/{projectId.ValueAsUriParameter}/jobs";
_jobsPath = $"{Project.Url}/{projectId.ValueAsUriParameter()}/jobs";
}

public IEnumerable<Job> GetJobs(JobScopeMask scope)
Expand Down
2 changes: 1 addition & 1 deletion NGitLab/Impl/MergeRequestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public MergeRequestClient(API api, int projectId)
public MergeRequestClient(API api, ProjectId projectId)
{
_api = api;
_projectPath = $"{Project.Url}/{projectId.ValueAsUriParameter}";
_projectPath = $"{Project.Url}/{projectId.ValueAsUriParameter()}";
}

public MergeRequestClient(API api)
Expand Down
6 changes: 3 additions & 3 deletions NGitLab/Impl/MilestoneClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ public class MilestoneClient : IMilestoneClient
private readonly API _api;
private readonly string _milestonePath;

internal MilestoneClient(API api, MilestoneScope scope, IdOrNamespacedPath id)
internal MilestoneClient(API api, MilestoneScope scope, IidOrPathAddressable id)
{
_api = api;
_milestonePath = $"/{scope.ToString().ToLowerInvariant()}/{id.ValueAsUriParameter}/milestones";
_milestonePath = $"/{scope.ToString().ToLowerInvariant()}/{id.ValueAsUriParameter()}/milestones";
Scope = scope;
}

[Obsolete("Use GitLabClient.GetMilestone() or GitLabClient.GetGroupMilestone() instead.")]
public MilestoneClient(API api, int projectId)
: this(api, MilestoneScope.Projects, projectId)
: this(api, MilestoneScope.Projects, (ProjectId)projectId)
{
}

Expand Down
2 changes: 1 addition & 1 deletion NGitLab/Impl/PipelineClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public PipelineClient(API api, int projectId)
public PipelineClient(API api, ProjectId projectId)
{
_api = api;
_projectPath = $"{Project.Url}/{projectId.ValueAsUriParameter}";
_projectPath = $"{Project.Url}/{projectId.ValueAsUriParameter()}";
_pipelinesPath = $"{_projectPath}/pipelines";
}

Expand Down
2 changes: 1 addition & 1 deletion NGitLab/Impl/ProjectBadgeClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace NGitLab.Impl
internal sealed class ProjectBadgeClient : BadgeClient, IProjectBadgeClient
{
public ProjectBadgeClient(API api, ProjectId projectId)
: base(api, $"{Project.Url}/{projectId.ValueAsUriParameter}")
: base(api, $"{Project.Url}/{projectId.ValueAsUriParameter()}")
{
}

Expand Down
2 changes: 1 addition & 1 deletion NGitLab/Impl/ProjectIssueNoteClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public ProjectIssueNoteClient(API api, int projectId)
public ProjectIssueNoteClient(API api, ProjectId projectId)
{
_api = api;
_projectId = projectId.ValueAsUriParameter;
_projectId = projectId.ValueAsUriParameter();
}

public IEnumerable<ProjectIssueNote> ForIssue(int issueId)
Expand Down
2 changes: 1 addition & 1 deletion NGitLab/Impl/ProjectLevelApprovalRulesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public ProjectLevelApprovalRulesClient(API api, int projectId)
public ProjectLevelApprovalRulesClient(API api, ProjectId projectId)
{
_api = api;
_approvalRulesUrl = $"{Project.Url}/{projectId.ValueAsUriParameter}/approval_rules";
_approvalRulesUrl = $"{Project.Url}/{projectId.ValueAsUriParameter()}/approval_rules";
}

public List<ApprovalRule> GetProjectLevelApprovalRules()
Expand Down
2 changes: 1 addition & 1 deletion NGitLab/Impl/ProjectVariableClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace NGitLab.Impl
internal sealed class ProjectVariableClient : VariableClient, IProjectVariableClient
{
public ProjectVariableClient(API api, ProjectId projectId)
: base(api, $"{Project.Url}/{projectId.ValueAsUriParameter}")
: base(api, $"{Project.Url}/{projectId.ValueAsUriParameter()}")
{
}
}
Expand Down
2 changes: 1 addition & 1 deletion NGitLab/Impl/ProtectedBranchClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal sealed class ProtectedBranchClient : IProtectedBranchClient
public ProtectedBranchClient(API api, ProjectId projectId)
{
_api = api;
_protectedBranchesUrl = $"{Project.Url}/{projectId.ValueAsUriParameter}/protected_branches";
_protectedBranchesUrl = $"{Project.Url}/{projectId.ValueAsUriParameter()}/protected_branches";
}

public ProtectedBranch ProtectBranch(BranchProtect branchProtect)
Expand Down
2 changes: 1 addition & 1 deletion NGitLab/Impl/ReleaseClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal sealed class ReleaseClient : IReleaseClient
public ReleaseClient(API api, ProjectId projectId)
{
_api = api;
var projectPath = $"{Project.Url}/{projectId.ValueAsUriParameter}";
var projectPath = $"{Project.Url}/{projectId.ValueAsUriParameter()}";
_releasesPath = $"{projectPath}/releases";
}

Expand Down
2 changes: 1 addition & 1 deletion NGitLab/Impl/RepositoryClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public RepositoryClient(API api, int projectId)
public RepositoryClient(API api, ProjectId projectId)
{
_api = api;
_projectPath = $"{Project.Url}/{projectId.ValueAsUriParameter}";
_projectPath = $"{Project.Url}/{projectId.ValueAsUriParameter()}";
_repoPath = $"{_projectPath}/repository";
}

Expand Down
Loading

0 comments on commit bdcaa24

Please sign in to comment.