private ValueTask <RpcConnectionInfoResponse> GetConnectionInfoAsync(RpcDiscoveryRequest request, LightweightCallContext context) { var connectionInfo = context.EndPoint.GetConnectionInfo(this.server.ServicePublisher.ServerId); return(new ValueTask <RpcConnectionInfoResponse>(new RpcConnectionInfoResponse { ClientId = request.ClientId, ConnectionInfo = connectionInfo })); }
private ValueTask <RpcPublishedSingletonsResponse> GetPublishedSingletonsAsync(RpcDiscoveryRequest request, IServiceProvider?serviceProvider, LightweightCallContext context) { var connectionInfo = context.EndPoint.GetConnectionInfo(this.server.ServicePublisher.ServerId); var publishedSingletons = this.GetPublishedSingletonsList(serviceProvider); return(new ValueTask <RpcPublishedSingletonsResponse>(new RpcPublishedSingletonsResponse { ClientId = request.ClientId, ConnectionInfo = connectionInfo, Services = publishedSingletons.ToArray() })); }