Skip to content

Commit 1900a94

Browse files
authored
Replace recent [Obsolete] additions with [EditorBrowsable] (#559)
* Replace recent [Obsolete] additions with [EditorBrowsable] Replace [Obsolete("Use long or namespaced path string as projectId instead.")] with [EditorBrowsable(EditorBrowsableState.Never)] * update
1 parent aac3dca commit 1900a94

15 files changed

+53
-48
lines changed

NGitLab/IGitLabClient.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System.ComponentModel;
22
using NGitLab.Models;
33

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

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

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

5050
IRepositoryClient GetRepository(ProjectId projectId);
5151

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

5555
ICommitClient GetCommits(ProjectId projectId);
5656

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

6060
ICommitStatusClient GetCommitStatus(ProjectId projectId);
6161

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

6565
IPipelineClient GetPipelines(ProjectId projectId);
6666

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

7070
ITriggerClient GetTriggers(ProjectId projectId);
7171

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

7575
IJobClient GetJobs(ProjectId projectId);
7676

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

8080
IMergeRequestClient GetMergeRequest(ProjectId projectId);
8181

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

8585
IMilestoneClient GetMilestone(ProjectId projectId);
8686

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

9090
IMilestoneClient GetGroupMilestone(GroupId groupId);
9191

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

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

113113
ISearchClient AdvancedSearch { get; }
114114

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

118118
IProjectIssueNoteClient GetProjectIssueNoteClient(ProjectId projectId);
119119

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

123123
IEnvironmentClient GetEnvironmentClient(ProjectId projectId);
124124

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

128128
IClusterClient GetClusterClient(ProjectId projectId);
129129

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

133133
IWikiClient GetWikiClient(ProjectId projectId);
134134

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

138138
IProjectBadgeClient GetProjectBadgeClient(ProjectId projectId);
139139

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

143143
IGroupBadgeClient GetGroupBadgeClient(GroupId groupId);
144144

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

148148
IProjectVariableClient GetProjectVariableClient(ProjectId projectId);
149149

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

153153
IGroupVariableClient GetGroupVariableClient(GroupId groupId);
154154

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

158158
IProjectLevelApprovalRulesClient GetProjectLevelApprovalRulesClient(ProjectId projectId);
159159

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

163163
IProtectedBranchClient GetProtectedBranchClient(ProjectId projectId);
164164

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

168168
public ISearchClient GetGroupSearchClient(GroupId groupId);
169169

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

173173
public ISearchClient GetProjectSearchClient(ProjectId projectId);

NGitLab/Impl/ClusterClient.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using System;
2-
using System.Collections.Generic;
1+
using System.Collections.Generic;
2+
using System.ComponentModel;
33
using NGitLab.Models;
44

55
namespace NGitLab.Impl
@@ -9,7 +9,7 @@ public class ClusterClient : IClusterClient
99
private readonly API _api;
1010
private readonly string _environmentsPath;
1111

12-
[Obsolete("Use long or namespaced path string as projectId instead.")]
12+
[EditorBrowsable(EditorBrowsableState.Never)]
1313
public ClusterClient(API api, int projectId)
1414
: this(api, (long)projectId)
1515
{

NGitLab/Impl/CommitClient.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.ComponentModel;
23
using System.Net;
34
using NGitLab.Models;
45

@@ -9,7 +10,7 @@ public class CommitClient : ICommitClient
910
private readonly API _api;
1011
private readonly string _repoPath;
1112

12-
[Obsolete("Use long or namespaced path string as projectId instead.")]
13+
[EditorBrowsable(EditorBrowsableState.Never)]
1314
public CommitClient(API api, int projectId)
1415
: this(api, (long)projectId)
1516
{

NGitLab/Impl/CommitStatusClient.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using System;
2-
using System.Collections.Generic;
1+
using System.Collections.Generic;
2+
using System.ComponentModel;
33
using NGitLab.Models;
44

55
namespace NGitLab.Impl
@@ -10,7 +10,7 @@ public class CommitStatusClient : ICommitStatusClient
1010
private readonly string _statusCreatePath;
1111
private readonly string _statusPath;
1212

13-
[Obsolete("Use long or namespaced path string as projectId instead.")]
13+
[EditorBrowsable(EditorBrowsableState.Never)]
1414
public CommitStatusClient(API api, int projectId)
1515
: this(api, (long)projectId)
1616
{

NGitLab/Impl/EnvironmentClient.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.ComponentModel;
34
using System.Threading;
45
using System.Threading.Tasks;
56
using NGitLab.Extensions;
@@ -12,7 +13,7 @@ public class EnvironmentClient : IEnvironmentClient
1213
private readonly API _api;
1314
private readonly string _environmentsPath;
1415

15-
[Obsolete("Use long or namespaced path string as projectId instead.")]
16+
[EditorBrowsable(EditorBrowsableState.Never)]
1617
public EnvironmentClient(API api, int projectId)
1718
: this(api, (long)projectId)
1819
{

NGitLab/Impl/JobClient.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.ComponentModel;
34
using System.IO;
45
using System.Threading;
56
using System.Threading.Tasks;
@@ -13,7 +14,7 @@ public class JobClient : IJobClient
1314
private readonly API _api;
1415
private readonly string _jobsPath;
1516

16-
[Obsolete("Use long or namespaced path string as projectId instead.")]
17+
[EditorBrowsable(EditorBrowsableState.Never)]
1718
public JobClient(API api, int projectId)
1819
: this(api, (long)projectId)
1920
{

NGitLab/Impl/MergeRequestClient.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.ComponentModel;
34
using System.Globalization;
45
using System.Threading;
56
using System.Threading.Tasks;
@@ -16,7 +17,7 @@ public class MergeRequestClient : IMergeRequestClient
1617
private readonly string _projectPath;
1718
private readonly API _api;
1819

19-
[Obsolete("Use long or namespaced path string as projectId instead.")]
20+
[EditorBrowsable(EditorBrowsableState.Never)]
2021
public MergeRequestClient(API api, int projectId)
2122
: this(api, (long)projectId)
2223
{

NGitLab/Impl/PipelineClient.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.ComponentModel;
34
using System.Linq;
45
using System.Text;
56
using System.Threading;
@@ -15,7 +16,7 @@ public class PipelineClient : IPipelineClient
1516
private readonly string _projectPath;
1617
private readonly string _pipelinesPath;
1718

18-
[Obsolete("Use long or namespaced path string as projectId instead.")]
19+
[EditorBrowsable(EditorBrowsableState.Never)]
1920
public PipelineClient(API api, int projectId)
2021
: this(api, (long)projectId)
2122
{

NGitLab/Impl/ProjectIssueNoteClient.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using System;
2-
using System.Collections.Generic;
1+
using System.Collections.Generic;
2+
using System.ComponentModel;
33
using NGitLab.Models;
44

55
namespace NGitLab.Impl
@@ -12,7 +12,7 @@ public class ProjectIssueNoteClient : IProjectIssueNoteClient
1212
private readonly API _api;
1313
private readonly string _projectId;
1414

15-
[Obsolete("Use long or namespaced path string as projectId instead.")]
15+
[EditorBrowsable(EditorBrowsableState.Never)]
1616
public ProjectIssueNoteClient(API api, int projectId)
1717
: this(api, (long)projectId)
1818
{

NGitLab/Impl/ProjectLevelApprovalRulesClient.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using System;
2-
using System.Collections.Generic;
1+
using System.Collections.Generic;
2+
using System.ComponentModel;
33
using NGitLab.Extensions;
44
using NGitLab.Models;
55

@@ -10,7 +10,7 @@ public class ProjectLevelApprovalRulesClient : IProjectLevelApprovalRulesClient
1010
private readonly API _api;
1111
private readonly string _approvalRulesUrl;
1212

13-
[Obsolete("Use long or namespaced path string as projectId instead.")]
13+
[EditorBrowsable(EditorBrowsableState.Never)]
1414
public ProjectLevelApprovalRulesClient(API api, int projectId)
1515
: this(api, (long)projectId)
1616
{

0 commit comments

Comments
 (0)