コード例 #1
0
 private IList <LinkDto> GetLinksForTeam(Guid teamId)
 {
     return(new List <LinkDto>
     {
         LinkDto.CreateLink(Url.Link(nameof(CreateTeam), null)),
         LinkDto.SelfLink(Url.Link(nameof(GetTeamById), new { teamId }))
     });
 }
コード例 #2
0
 private IList <LinkDto> GetLinksForRight(Guid rightId)
 {
     return(new List <LinkDto>
     {
         LinkDto.SelfLink(Url.Link(nameof(GetRightById), new { rightId })),
         LinkDto.AllLink(Url.Link(nameof(GetRights), null))
     });
 }
コード例 #3
0
 private IList <LinkDto> GetLinksForLanguage(Guid languageId)
 {
     return(new List <LinkDto>
     {
         LinkDto.SelfLink(Url.Link(nameof(GetLanguageById), new { languageId })),
         LinkDto.AllLink(Url.Link(nameof(GetLanguages), null))
     });
 }
コード例 #4
0
 private IList <LinkDto> GetLinksForParticipation(Guid participationId)
 {
     return(new List <LinkDto>
     {
         LinkDto.SelfLink(Url.Link(nameof(GetParticipationSessionById), new { participationId })),
         LinkDto.AuthLink(Url.Link(nameof(AuthenticateUserOnParticipation), new { participationId })),
         new(Url.Link(nameof(RunExecutionParticipation), new { participationId }), "execution", HttpMethod.Post)
     });
コード例 #5
0
 private IList <LinkDto> GetLinksForTest(Guid stepId, Guid testId)
 {
     return(new List <LinkDto>
     {
         LinkDto.SelfLink(Url.Link(nameof(GetTestById), new { testId })),
         LinkDto.CreateLink(Url.Link(nameof(StepsController.AddTest), new { stepId, testId })),
         LinkDto.AllLink(Url.Link(nameof(GetTests), null))
     });
 }
コード例 #6
0
 private IList <LinkDto> GetLinksForParticipation(Guid participationId)
 {
     return(new List <LinkDto>
     {
         LinkDto.CreateLink(Url.Link(nameof(CreateParticipation), null)),
         LinkDto.SelfLink(Url.Link(nameof(GetParticipationById), new { participationId })),
         LinkDto.AllLink(Url.Link(nameof(GetParticipations), null))
     });
 }
コード例 #7
0
 private IList <LinkDto> GetLinksForUser(Guid userId)
 {
     return(new List <LinkDto>
     {
         LinkDto.SelfLink(Url.Link(nameof(GetUserById), new { userId })),
         LinkDto.DeleteLink(Url.Link(nameof(DeleteUserById), new { userId })),
         LinkDto.AllLink(Url.Link(nameof(GetAllUsers), null)),
     });
 }
コード例 #8
0
 private IList <LinkDto> GetLinksForMember(Guid memberId, Guid teamId)
 {
     return(new List <LinkDto>
     {
         LinkDto.CreateLink(Url.Link(nameof(AddMemberToTeam), new { teamId })),
         LinkDto.DeleteLink(Url.Link(nameof(RemoveMemberFromTeam), new { teamId, memberId })),
         LinkDto.SelfLink(Url.Link(nameof(GetTeamMemberById), new { teamId, memberId })),
         new(Url.Link(nameof(GetMembers), new { teamId }), "all", HttpMethod.Get)
     });
コード例 #9
0
 private IList <LinkDto> GetLinksForParticipation(Guid tournamentId, Guid teamId, Guid stepId)
 {
     return(new List <LinkDto>
     {
         LinkDto.AllLink(Url.Link(nameof(GetTeamParticipationsByTournament), new { teamId, tournamentId })),
         LinkDto.SelfLink(Url.Link(nameof(GetTeamParticipationsByTournamentAndStep),
                                   new { teamId, tournamentId, stepId }))
     });
 }
コード例 #10
0
 private IList <LinkDto> GetLinksForUser(Guid participationId, Guid userId)
 {
     return(new List <LinkDto>
     {
         LinkDto.AllLink(Url.Link(nameof(GetUsers), new { participationId })),
         LinkDto.SelfLink(Url.Link(nameof(GetSessionUserById), new { participationId, userId })),
         LinkDto.CreateLink(Url.Link(nameof(ElevateMember), new { participationId, userId }))
     });
 }
コード例 #11
0
 private IList <LinkDto> GetLinksForFunction(Guid participationId, Guid functionId)
 {
     return(new List <LinkDto>
     {
         LinkDto.CreateLink(Url.Link(nameof(AddSessionFunction), new { participationId })),
         LinkDto.DeleteLink(Url.Link(nameof(RemoveSessionFunction), new { participationId, functionId })),
         LinkDto.AllLink(Url.Link(nameof(GetFunctions), new { participationId })),
         LinkDto.SelfLink(Url.Link(nameof(GetSessionFunctionById), new { participationId, functionId })),
         LinkDto.UpdateLink(Url.Link(nameof(UpdateSessionFunction), new { participationId, functionId }))
     });
 }