2 overrides of GetStatements
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
40 references to GetStatements
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp.Features (1)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (13)
CodeGeneration\SyntaxGeneratorTests.cs (13)
3288Assert.Equal(1, Generator.GetStatements(Generator.ValueReturningLambdaExpression("p", [Generator.IdentifierName("x")])).Count);
3378Assert.Equal(0, Generator.GetStatements(getAccessor).Count);
3379Assert.Equal(0, Generator.GetStatements(setAccessor).Count);
3541Assert.Equal(0, Generator.GetStatements(Generator.MethodDeclaration("m")).Count);
3542Assert.Equal(2, Generator.GetStatements(Generator.MethodDeclaration("m", statements: stmts)).Count);
3544Assert.Equal(0, Generator.GetStatements(Generator.ConstructorDeclaration()).Count);
3545Assert.Equal(2, Generator.GetStatements(Generator.ConstructorDeclaration(statements: stmts)).Count);
3548Assert.Equal(2, Generator.GetStatements(Generator.VoidReturningLambdaExpression(stmts)).Count);
3551Assert.Equal(2, Generator.GetStatements(Generator.ValueReturningLambdaExpression(stmts)).Count);
3553Assert.Equal(0, Generator.GetStatements(Generator.IdentifierName("x")).Count);
3568Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.MethodDeclaration("m"), stmts)).Count);
3569Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.ConstructorDeclaration(), stmts)).Count);
3573Assert.Equal(0, Generator.GetStatements(Generator.WithStatements(Generator.IdentifierName("x"), stmts)).Count);
Microsoft.CodeAnalysis.Features (2)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (21)
CodeGeneration\SyntaxGeneratorTests.vb (21)
2887Assert.Equal(1, Generator.GetStatements(Generator.ValueReturningLambdaExpression("p", {Generator.IdentifierName("x")})).Count)
2965Assert.Equal(0, Generator.GetStatements(Generator.MethodDeclaration("m")).Count)
2966Assert.Equal(2, Generator.GetStatements(Generator.MethodDeclaration("m", statements:=stmts)).Count)
2968Assert.Equal(0, Generator.GetStatements(Generator.ConstructorDeclaration()).Count)
2969Assert.Equal(2, Generator.GetStatements(Generator.ConstructorDeclaration(statements:=stmts)).Count)
2971Assert.Equal(0, Generator.GetStatements(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("e"))).Count)
2972Assert.Equal(0, Generator.GetStatements(Generator.VoidReturningLambdaExpression({})).Count)
2973Assert.Equal(2, Generator.GetStatements(Generator.VoidReturningLambdaExpression(stmts)).Count)
2975Assert.Equal(0, Generator.GetStatements(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("e"))).Count)
2976Assert.Equal(0, Generator.GetStatements(Generator.ValueReturningLambdaExpression({})).Count)
2977Assert.Equal(2, Generator.GetStatements(Generator.ValueReturningLambdaExpression(stmts)).Count)
2979Assert.Equal(0, Generator.GetStatements(Generator.IdentifierName("x")).Count)
2986Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.MethodDeclaration("m"), stmts)).Count)
2987Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.ConstructorDeclaration(), stmts)).Count)
2989Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.VoidReturningLambdaExpression({}), stmts)).Count)
2990Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.ValueReturningLambdaExpression({}), stmts)).Count)
2992Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("e")), stmts)).Count)
2993Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("e")), stmts)).Count)
2995Assert.Equal(0, Generator.GetStatements(Generator.WithStatements(Generator.IdentifierName("x"), stmts)).Count)
3082Assert.Equal(0, _g.GetStatements(getAccessor).Count)
3083Assert.Equal(0, _g.GetStatements(setAccessor).Count)