public override async Task <GetServicesResponse> GetServices(GetServicesRequest request, ServerCallContext context) { var serviceName = await _ServiceQuery.GetServices(context.CancellationToken); GetServicesResponse getServicesResponse = new GetServicesResponse(); getServicesResponse.Services.Add(serviceName.Distinct().ToArray()); return(getServicesResponse); }
public async Task <IEnumerable <string> > Get([FromServices] IServiceQuery query) { var services = await query.GetServices(new TimeRangeQuery()); return(services.Select(x => x.Name)); }