Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0a32c74

Browse files
IssueAssignmentException
1 parent 6f2eed7 commit 0a32c74

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace AspnetRun.Core.Exceptions
2+
{
3+
class IssueAssignmentException
4+
{
5+
6+
}
7+
}

‎src/AspnetRun.Core/Interfaces/IIssueRepository.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace AspnetRun.Core.Interfaces
77
{
88
public interface IIssueRepository : IAsyncRepository<Issue>
99
{
10-
int GetOpenIssueCountOfUser(string userId);
10+
int GetOpenIssueCountOfUser(int userId);
1111
List<Issue> GetCommentsWithCreatorUsers(int issueId);
1212
}
1313
}

‎src/AspnetRun.Core/Policy/IssueAssignmentPolicy.cs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Collections.Generic;
33
using System.Text;
44
using AspnetRun.Core.Entities;
5+
using AspnetRun.Core.Interfaces;
56

67
namespace AspnetRun.Core.Policy
78
{
@@ -18,7 +19,10 @@ public IssueAssignmentPolicy(IIssueRepository issueRepository, IIssueAssignmentC
1819

1920
public void CheckAssignment(Issue issue, User user)
2021
{
21-
throw new NotImplementedException();
22+
if(_issueRepository.GetOpenIssueCountOfUser(user.Id) >= _configuration.MaxConcurrentOpenIssueCountForAUser)
23+
{
24+
throw new
25+
}
2226
}
2327
}
2428
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /