73 references to MethodKind
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (73)
EditAndContinue\Helpers\EditingTestBase.cs (18)
135internal static EditScriptDescription GetTopEdits(string methodBody1, string methodBody2, MethodKind kind) 161internal static EditScriptDescription GetMethodEdits(string src1, string src2, MethodKind kind = MethodKind.Regular) 167internal static Match<SyntaxNode> GetMethodMatch(string src1, string src2, MethodKind kind = MethodKind.Regular) 179Assert.Equal(kind is not MethodKind.Regular and not MethodKind.ConstructorWithParameters, needsSyntaxMap); 184internal static IEnumerable<KeyValuePair<SyntaxNode, SyntaxNode>> GetMethodMatches(string src1, string src2, MethodKind kind = MethodKind.Regular) 198MethodKind kind = MethodKind.Regular) 209if (kind == MethodKind.ConstructorWithParameters) 218var bodyNode = (kind != MethodKind.Regular) 225internal static string WrapMethodBodyWithClass(string bodySource, MethodKind kind = MethodKind.Regular) 228MethodKind.Iterator => "class C { IEnumerable<int> F() { " + bodySource + " } }", 229MethodKind.Async => "class C { async Task<int> F() { " + bodySource + " } }", 230MethodKind.ConstructorWithParameters => "class C { C" + bodySource + " }",
EditAndContinue\StatementEditingTests.cs (9)
9408var edits = GetTopEdits(src1, src2, MethodKind.Regular); 9431var edits = GetTopEdits(src1, src2, MethodKind.Regular); 9459var edits = GetTopEdits(src1, src2, MethodKind.Regular); 9480var edits = GetTopEdits(src1, src2, MethodKind.Regular); 10422var edits = GetMethodEdits(src1, src2, MethodKind.Async); 11365var bodyEdits = GetMethodEdits(src1, src2, kind: MethodKind.Iterator); 11416var bodyEdits = GetMethodEdits(src1, src2, kind: MethodKind.Iterator); 11801var bodyEdits = GetMethodEdits(src1, src2, kind: MethodKind.Async); 12124var bodyEdits = GetMethodEdits(src1, src2, kind: MethodKind.Async);
EditAndContinue\StatementMatchingTests.cs (46)
161var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 186var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 219var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 486var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 513var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 540var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 559var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 591var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 984var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 1392var match = GetMethodMatches(src1, src2, MethodKind.Async); 1429var match = GetMethodMatches(src1, src2, MethodKind.Async); 1484var match = GetMethodMatches(src1, src2, kind: MethodKind.Iterator); 1509var match = GetMethodMatches(src1, src2, kind: MethodKind.Iterator); 1539var match = GetMethodMatches(src1, src2, kind: MethodKind.Iterator); 1572var match = GetMethodMatches(src1, src2, kind: MethodKind.Iterator); 1596var match = GetMethodMatches(src1, src2, kind: MethodKind.Async); 1629var match = GetMethodMatches(src1, src2, kind: MethodKind.Async); 1666var match = GetMethodMatches(src1, src2, kind: MethodKind.Async); 1684var match = GetMethodMatches(src1, src2, kind: MethodKind.Async); 1703var match = GetMethodMatches(src1, src2, kind: MethodKind.Async); 1721var match = GetMethodMatches(src1, src2, kind: MethodKind.Async); 1744var match = GetMethodMatches(src1, src2, kind: MethodKind.Async); 1762var match = GetMethodMatches(src1, src2, kind: MethodKind.Async); 1786var match = GetMethodMatches(src1, src2, kind: MethodKind.Async); 1805var match = GetMethodMatches(src1, src2, kind: MethodKind.Async); 1824var match = GetMethodMatches(src1, src2, kind: MethodKind.Async); 1842var match = GetMethodMatches(src1, src2, kind: MethodKind.Async); 1874var match = GetMethodMatches(src1, src2, kind: MethodKind.ConstructorWithParameters); 1900var match = GetMethodMatches(src1, src2, kind: MethodKind.ConstructorWithParameters); 1931var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 1971var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 2004var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 2032var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 2063var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 2100var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 2130var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 2166var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 2215var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 2253var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 2298var match = GetMethodMatches(src1, src2, kind: MethodKind.Async); 2345var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 2379var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 2412var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 2443var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 2465var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular); 2485var match = GetMethodMatches(src1, src2, kind: MethodKind.Regular);