You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
709 B
28 lines
709 B
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);
|
|
}
|
|
}
|