示例#1
0
        public async Task RequestDiags(string code, int generation)
        {
            await DoCancellableAction(async (token) =>
            {
                var diags = await ideServices.GetDiagnosticsAsyc(code, token);

                // If cancelled, then don't bother sending details back to the client
                token.ThrowIfCancellationRequested();

                Clients.Caller.DiagsCallback(diags == null ? null : CompilerError.ArrayFromDiagnostics(diags), generation);
            }, Context.ConnectionId, inProgressDiags);
        }