28 lines
709 B
C#
28 lines
709 B
C#
using System.Collections.Immutable;
|
|
using Connected.Net;
|
|
using Connected.Net.Endpoints;
|
|
using Connected.ServiceModel;
|
|
using Connected.Services;
|
|
using Connected.Services.Annotations;
|
|
|
|
namespace Common.Net;
|
|
|
|
internal sealed class EndpointService : EntityService<int>, IEndpointService
|
|
{
|
|
public EndpointService(IContext context) : base(context)
|
|
{
|
|
}
|
|
|
|
[ServiceAuthorization(NetClaims.NetDiscovery)]
|
|
public async Task<ImmutableList<IEndpoint>?> Query()
|
|
{
|
|
return await Invoke(GetOperation<QueryEndpoints>(), Dto.Empty);
|
|
}
|
|
|
|
[ServiceAuthorization(NetClaims.NetDiscovery)]
|
|
public async Task<IEndpoint?> Select(PrimaryKeyArgs<int> args)
|
|
{
|
|
return await Invoke(GetOperation<SelectEndpoint>(), args);
|
|
}
|
|
}
|