Skip to content

Commit

Permalink
Replace recent [Obsolete] additions with [EditorBrowsable] (#559)
Browse files Browse the repository at this point in the history
* Replace recent [Obsolete] additions with [EditorBrowsable]

Replace
[Obsolete("Use long or namespaced path string as projectId instead.")]
with
[EditorBrowsable(EditorBrowsableState.Never)]

* update
  • Loading branch information
louis-z authored Nov 13, 2023
1 parent aac3dca commit 1900a94
Show file tree
Hide file tree
Showing 15 changed files with 53 additions and 48 deletions.
48 changes: 24 additions & 24 deletions NGitLab/IGitLabClient.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System.ComponentModel;
using NGitLab.Models;

namespace NGitLab
Expand Down Expand Up @@ -36,60 +36,60 @@ public interface IGitLabClient
/// <summary>
/// Returns the events that occurred in the specified project.
/// </summary>
[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
IEventClient GetProjectEvents(int projectId);

/// <summary>
/// Returns the events that occurred in the specified project.
/// </summary>
IEventClient GetProjectEvents(ProjectId projectId);

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
IRepositoryClient GetRepository(int projectId);

IRepositoryClient GetRepository(ProjectId projectId);

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
ICommitClient GetCommits(int projectId);

ICommitClient GetCommits(ProjectId projectId);

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
ICommitStatusClient GetCommitStatus(int projectId);

ICommitStatusClient GetCommitStatus(ProjectId projectId);

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
IPipelineClient GetPipelines(int projectId);

IPipelineClient GetPipelines(ProjectId projectId);

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
ITriggerClient GetTriggers(int projectId);

ITriggerClient GetTriggers(ProjectId projectId);

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
IJobClient GetJobs(int projectId);

IJobClient GetJobs(ProjectId projectId);

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
IMergeRequestClient GetMergeRequest(int projectId);

IMergeRequestClient GetMergeRequest(ProjectId projectId);

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
IMilestoneClient GetMilestone(int projectId);

IMilestoneClient GetMilestone(ProjectId projectId);

[Obsolete("Use long or namespaced path string as groupId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
IMilestoneClient GetGroupMilestone(int groupId);

IMilestoneClient GetGroupMilestone(GroupId groupId);

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
IReleaseClient GetReleases(int projectId);

IReleaseClient GetReleases(ProjectId projectId);
Expand All @@ -112,62 +112,62 @@ public interface IGitLabClient

ISearchClient AdvancedSearch { get; }

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
IProjectIssueNoteClient GetProjectIssueNoteClient(int projectId);

IProjectIssueNoteClient GetProjectIssueNoteClient(ProjectId projectId);

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
IEnvironmentClient GetEnvironmentClient(int projectId);

IEnvironmentClient GetEnvironmentClient(ProjectId projectId);

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
IClusterClient GetClusterClient(int projectId);

IClusterClient GetClusterClient(ProjectId projectId);

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
IWikiClient GetWikiClient(int projectId);

IWikiClient GetWikiClient(ProjectId projectId);

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
IProjectBadgeClient GetProjectBadgeClient(int projectId);

IProjectBadgeClient GetProjectBadgeClient(ProjectId projectId);

[Obsolete("Use long or namespaced path string as groupId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
IGroupBadgeClient GetGroupBadgeClient(int groupId);

IGroupBadgeClient GetGroupBadgeClient(GroupId groupId);

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
IProjectVariableClient GetProjectVariableClient(int projectId);

IProjectVariableClient GetProjectVariableClient(ProjectId projectId);

[Obsolete("Use long or namespaced path string as groupId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
IGroupVariableClient GetGroupVariableClient(int groupId);

IGroupVariableClient GetGroupVariableClient(GroupId groupId);

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
IProjectLevelApprovalRulesClient GetProjectLevelApprovalRulesClient(int projectId);

IProjectLevelApprovalRulesClient GetProjectLevelApprovalRulesClient(ProjectId projectId);

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
IProtectedBranchClient GetProtectedBranchClient(int projectId);

IProtectedBranchClient GetProtectedBranchClient(ProjectId projectId);

[Obsolete("Use long or namespaced path string as groupId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
public ISearchClient GetGroupSearchClient(int groupId);

public ISearchClient GetGroupSearchClient(GroupId groupId);

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
public ISearchClient GetProjectSearchClient(int projectId);

public ISearchClient GetProjectSearchClient(ProjectId projectId);
Expand Down
6 changes: 3 additions & 3 deletions NGitLab/Impl/ClusterClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.ComponentModel;
using NGitLab.Models;

namespace NGitLab.Impl
Expand All @@ -9,7 +9,7 @@ public class ClusterClient : IClusterClient
private readonly API _api;
private readonly string _environmentsPath;

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
public ClusterClient(API api, int projectId)
: this(api, (long)projectId)
{
Expand Down
3 changes: 2 additions & 1 deletion NGitLab/Impl/CommitClient.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.ComponentModel;
using System.Net;
using NGitLab.Models;

Expand All @@ -9,7 +10,7 @@ public class CommitClient : ICommitClient
private readonly API _api;
private readonly string _repoPath;

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
public CommitClient(API api, int projectId)
: this(api, (long)projectId)
{
Expand Down
6 changes: 3 additions & 3 deletions NGitLab/Impl/CommitStatusClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.ComponentModel;
using NGitLab.Models;

namespace NGitLab.Impl
Expand All @@ -10,7 +10,7 @@ public class CommitStatusClient : ICommitStatusClient
private readonly string _statusCreatePath;
private readonly string _statusPath;

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
public CommitStatusClient(API api, int projectId)
: this(api, (long)projectId)
{
Expand Down
3 changes: 2 additions & 1 deletion NGitLab/Impl/EnvironmentClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Threading;
using System.Threading.Tasks;
using NGitLab.Extensions;
Expand All @@ -12,7 +13,7 @@ public class EnvironmentClient : IEnvironmentClient
private readonly API _api;
private readonly string _environmentsPath;

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
public EnvironmentClient(API api, int projectId)
: this(api, (long)projectId)
{
Expand Down
3 changes: 2 additions & 1 deletion NGitLab/Impl/JobClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
Expand All @@ -13,7 +14,7 @@ public class JobClient : IJobClient
private readonly API _api;
private readonly string _jobsPath;

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
public JobClient(API api, int projectId)
: this(api, (long)projectId)
{
Expand Down
3 changes: 2 additions & 1 deletion NGitLab/Impl/MergeRequestClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Threading;
using System.Threading.Tasks;
Expand All @@ -16,7 +17,7 @@ public class MergeRequestClient : IMergeRequestClient
private readonly string _projectPath;
private readonly API _api;

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
public MergeRequestClient(API api, int projectId)
: this(api, (long)projectId)
{
Expand Down
3 changes: 2 additions & 1 deletion NGitLab/Impl/PipelineClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading;
Expand All @@ -15,7 +16,7 @@ public class PipelineClient : IPipelineClient
private readonly string _projectPath;
private readonly string _pipelinesPath;

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
public PipelineClient(API api, int projectId)
: this(api, (long)projectId)
{
Expand Down
6 changes: 3 additions & 3 deletions NGitLab/Impl/ProjectIssueNoteClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.ComponentModel;
using NGitLab.Models;

namespace NGitLab.Impl
Expand All @@ -12,7 +12,7 @@ public class ProjectIssueNoteClient : IProjectIssueNoteClient
private readonly API _api;
private readonly string _projectId;

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
public ProjectIssueNoteClient(API api, int projectId)
: this(api, (long)projectId)
{
Expand Down
6 changes: 3 additions & 3 deletions NGitLab/Impl/ProjectLevelApprovalRulesClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.ComponentModel;
using NGitLab.Extensions;
using NGitLab.Models;

Expand All @@ -10,7 +10,7 @@ public class ProjectLevelApprovalRulesClient : IProjectLevelApprovalRulesClient
private readonly API _api;
private readonly string _approvalRulesUrl;

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
public ProjectLevelApprovalRulesClient(API api, int projectId)
: this(api, (long)projectId)
{
Expand Down
1 change: 0 additions & 1 deletion NGitLab/Impl/ProtectedBranchClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using NGitLab.Extensions;
using NGitLab.Models;

namespace NGitLab.Impl
Expand Down
1 change: 0 additions & 1 deletion NGitLab/Impl/ReleaseClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using NGitLab.Extensions;
using NGitLab.Models;

namespace NGitLab.Impl
Expand Down
3 changes: 2 additions & 1 deletion NGitLab/Impl/RepositoryClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.IO;
using System.Linq;
Expand All @@ -14,7 +15,7 @@ public class RepositoryClient : IRepositoryClient
private readonly string _repoPath;
private readonly string _projectPath;

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
public RepositoryClient(API api, int projectId)
: this(api, (long)projectId)
{
Expand Down
6 changes: 3 additions & 3 deletions NGitLab/Impl/TriggerClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.ComponentModel;
using NGitLab.Extensions;
using NGitLab.Models;

Expand All @@ -10,7 +10,7 @@ public class TriggerClient : ITriggerClient
private readonly API _api;
private readonly string _triggersPath;

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
public TriggerClient(API api, int projectId)
: this(api, (long)projectId)
{
Expand Down
3 changes: 2 additions & 1 deletion NGitLab/Impl/WikiClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Net;
using NGitLab.Models;

Expand All @@ -10,7 +11,7 @@ public class WikiClient : IWikiClient
private readonly API _api;
private readonly string _projectPath;

[Obsolete("Use long or namespaced path string as projectId instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
public WikiClient(API api, int projectId)
: this(api, (long)projectId)
{
Expand Down

0 comments on commit 1900a94

Please sign in to comment.