Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public async Task <IEnumerable <string> > Get([FromServices] IServiceQuery query)
        {
            var services = await query.GetServices(new TimeRangeQuery());

            return(services.Select(x => x.Name));
        }