public async Task RequestAssetAsync(int scopeId, Checksum[] checksums, string pipeName, CancellationToken cancellationToken) { try { using var combinedCancellationToken = _shutdownCancellationSource.Token.CombineWith(cancellationToken); using (Logger.LogBlock(FunctionId.JsonRpcSession_RequestAssetAsync, pipeName, combinedCancellationToken.Token)) { await RemoteEndPoint.WriteDataToNamedPipeAsync( pipeName, (scopeId, checksums), (writer, data, ct) => WriteAssetAsync(writer, data.scopeId, data.checksums, ct), combinedCancellationToken.Token).ConfigureAwait(false); } } catch (Exception ex) when(_endPoint.ReportAndPropagateUnexpectedException(ex, cancellationToken)) { throw ExceptionUtilities.Unreachable; } }