Skip to content

Commit

Permalink
Fix typo IIdOrPathAddressable
Browse files Browse the repository at this point in the history
  • Loading branch information
PMExtra authored Nov 3, 2023
1 parent aa63335 commit 7fce538
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/MilestoneClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal sealed class MilestoneClient : ClientBase, IMilestoneClient
{
private readonly int _resourceId;

public MilestoneClient(ClientContext context, IidOrPathAddressable id, MilestoneScope scope)
public MilestoneClient(ClientContext context, IIdOrPathAddressable id, MilestoneScope scope)
: base(context)
{
_resourceId = scope switch
Expand Down
2 changes: 1 addition & 1 deletion NGitLab/Impl/MilestoneClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class MilestoneClient : IMilestoneClient
private readonly API _api;
private readonly string _milestonePath;

internal MilestoneClient(API api, MilestoneScope scope, IidOrPathAddressable id)
internal MilestoneClient(API api, MilestoneScope scope, IIdOrPathAddressable id)
{
_api = api;
_milestonePath = $"/{scope.ToString().ToLowerInvariant()}/{id.ValueAsUriParameter()}/milestones";
Expand Down
6 changes: 3 additions & 3 deletions NGitLab/Models/GroupId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace NGitLab.Models
{
public readonly struct GroupId : IidOrPathAddressable
public readonly struct GroupId : IIdOrPathAddressable
{
private readonly long _id;
private readonly string _path;

long IidOrPathAddressable.Id => _id;
long IIdOrPathAddressable.Id => _id;

string IidOrPathAddressable.Path => _path;
string IIdOrPathAddressable.Path => _path;

public GroupId(long id)
{
Expand Down
4 changes: 2 additions & 2 deletions NGitLab/Models/IdOrPathExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ namespace NGitLab.Models
{
public static class IdOrPathExtensions
{
public static string ValueAsString(this IidOrPathAddressable idOrPath)
public static string ValueAsString(this IIdOrPathAddressable idOrPath)
=> idOrPath.Path ?? idOrPath.Id.ToStringInvariant();

public static string ValueAsUriParameter(this IidOrPathAddressable idOrPath)
public static string ValueAsUriParameter(this IIdOrPathAddressable idOrPath)
=> idOrPath.Path is null ? idOrPath.Id.ToStringInvariant() : Uri.EscapeDataString(idOrPath.Path);
}
}
2 changes: 1 addition & 1 deletion NGitLab/Models/IidOrPathAddressable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace NGitLab.Models
{
public interface IidOrPathAddressable
public interface IIdOrPathAddressable
{
internal long Id { get; }

Expand Down
6 changes: 3 additions & 3 deletions NGitLab/Models/ProjectId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace NGitLab.Models
{
public readonly struct ProjectId : IidOrPathAddressable
public readonly struct ProjectId : IIdOrPathAddressable
{
private readonly long _id;
private readonly string _path;

long IidOrPathAddressable.Id => _id;
long IIdOrPathAddressable.Id => _id;

string IidOrPathAddressable.Path => _path;
string IIdOrPathAddressable.Path => _path;

public ProjectId(long id)
{
Expand Down
6 changes: 3 additions & 3 deletions NGitLab/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1854,7 +1854,7 @@ NGitLab.Models.Identity.Identity() -> void
NGitLab.Models.Identity.Provider -> string
NGitLab.Models.Identity.SamlProviderId -> int?
NGitLab.Models.IdOrPathExtensions
NGitLab.Models.IidOrPathAddressable
NGitLab.Models.IIdOrPathAddressable
NGitLab.Models.Issue
NGitLab.Models.Issue.Assignee -> NGitLab.Models.Assignee
NGitLab.Models.Issue.Assignees -> NGitLab.Models.Assignee[]
Expand Down Expand Up @@ -3747,8 +3747,8 @@ static NGitLab.Models.FileUpsert.Base64Encode(string plainText) -> string
static NGitLab.Models.GroupId.implicit operator NGitLab.Models.GroupId(long id) -> NGitLab.Models.GroupId
static NGitLab.Models.GroupId.implicit operator NGitLab.Models.GroupId(NGitLab.Models.Group group) -> NGitLab.Models.GroupId
static NGitLab.Models.GroupId.implicit operator NGitLab.Models.GroupId(string path) -> NGitLab.Models.GroupId
static NGitLab.Models.IdOrPathExtensions.ValueAsString(this NGitLab.Models.IidOrPathAddressable idOrPath) -> string
static NGitLab.Models.IdOrPathExtensions.ValueAsUriParameter(this NGitLab.Models.IidOrPathAddressable idOrPath) -> string
static NGitLab.Models.IdOrPathExtensions.ValueAsString(this NGitLab.Models.IIdOrPathAddressable idOrPath) -> string
static NGitLab.Models.IdOrPathExtensions.ValueAsUriParameter(this NGitLab.Models.IIdOrPathAddressable idOrPath) -> string
static NGitLab.Models.ProjectId.implicit operator NGitLab.Models.ProjectId(long id) -> NGitLab.Models.ProjectId
static NGitLab.Models.ProjectId.implicit operator NGitLab.Models.ProjectId(NGitLab.Models.Project project) -> NGitLab.Models.ProjectId
static NGitLab.Models.ProjectId.implicit operator NGitLab.Models.ProjectId(string path) -> NGitLab.Models.ProjectId
Expand Down

0 comments on commit 7fce538

Please sign in to comment.