Exemplo n.º 1
0
        public async Task RequestParameters(string code, int cursorPosition, int tokenStart)
        {
            await DoCancellableAction(async (token) =>
            {
                var paramsRaw = await ideServices.GetOverloadsAndParametersAsync(code, cursorPosition, token);

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

                if (paramsRaw != null) // Don't bother calling back if there is no parameter list to show
                {
                    var overloads = new Overloads(paramsRaw);
                    Clients.Caller.ParamsCallback(overloads, tokenStart);
                }
            }, Context.ConnectionId, inProgressParams);
        }
Exemplo n.º 2
0
        public async Task ParametersTest()
        {
            IEnumerable <ISymbol> actual = await ideServices.GetOverloadsAndParametersAsync("private static void X() { System.Console.WriteLine(\"Blah blah blah\")  }", 53);

            Assert.AreEqual(19, actual.Count());
        }