tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
IRestAuthorityInvoker{TAuthority}.cs
Go to the documentation of this file.
1using System;
2using System.Threading.Tasks;
3
4using Microsoft.AspNetCore.Mvc;
5
9
11{
16 public interface IRestAuthorityInvoker<TAuthority> : IAuthorityInvoker<TAuthority>
17 where TAuthority : IAuthority
18 {
25 ValueTask<IActionResult> Invoke(ApiController controller, Func<TAuthority, ValueTask<AuthorityResponse>> authorityInvoker);
26
35 ValueTask<IActionResult> Invoke<TResult, TApiModel>(ApiController controller, Func<TAuthority, ValueTask<AuthorityResponse<TResult>>> authorityInvoker)
36 where TResult : TApiModel
37 where TApiModel : notnull;
38
47 ValueTask<IActionResult> InvokeTransformable<TResult, TApiModel>(ApiController controller, Func<TAuthority, ValueTask<AuthorityResponse<TResult>>> authorityInvoker)
48 where TResult : notnull, ILegacyApiTransformable<TApiModel>
49 where TApiModel : notnull;
50 }
51}
Base Controller for API functions.
Business logic for interating with the server.
Definition IAuthority.cs:9
Invokes TAuthority methods and generates IActionResult responses.
ValueTask< IActionResult > InvokeTransformable< TResult, TApiModel >(ApiController controller, Func< TAuthority, ValueTask< AuthorityResponse< TResult > > > authorityInvoker)
Invoke a TAuthority method and get the result.
ValueTask< IActionResult > Invoke< TResult, TApiModel >(ApiController controller, Func< TAuthority, ValueTask< AuthorityResponse< TResult > > > authorityInvoker)
Invoke a TAuthority method and get the result.
ValueTask< IActionResult > Invoke(ApiController controller, Func< TAuthority, ValueTask< AuthorityResponse > > authorityInvoker)
Invoke a TAuthority method with no success result.
Represents a host-side model that may be transformed into a TApiModel .