2 overrides of ThrowStatement
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
3108public override SyntaxNode ThrowStatement(SyntaxNode? expression = null)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
391Public Overrides Function ThrowStatement(Optional expressionOpt As SyntaxNode = Nothing) As SyntaxNode
16 references to ThrowStatement
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
CodeGenerationHelpers.cs (1)
37return factory.ThrowStatement(exceptionCreationExpression);
SyntaxGeneratorExtensions.cs (1)
24return codeDefinitionFactory.ThrowStatement(
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (2)
CodeGeneration\SyntaxGeneratorTests.cs (2)
553VerifySyntax<ThrowStatementSyntax>(Generator.ThrowStatement(), "throw;"); 554VerifySyntax<ThrowStatementSyntax>(Generator.ThrowStatement(Generator.IdentifierName("x")), "throw x;");
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
CodeGeneration\StatementGenerationTests.cs (3)
18Test(f => f.ThrowStatement(), 28Test(f => f.ThrowStatement( 39Test(f => f.ThrowStatement(
Microsoft.CodeAnalysis.Features (4)
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (1)
401var throwStatement = (TStatementSyntax)generator.ThrowStatement(CreateArgumentException(compilation, generator, parameter, methodName));
InlineMethod\AbstractInlineMethodRefactoringProvider.cs (2)
444.ThrowStatement(inlineMethodContext.InlineExpression); 460.ThrowStatement(_syntaxFacts.GetExpressionOfThrowExpression(inlineMethodContext.InlineExpression));
ReplaceConditionalWithStatements\AbstractReplaceConditionalWithStatementsCodeRefactoringProvider.cs (1)
316return generator.ThrowStatement(syntaxFacts.GetExpressionOfThrowExpression(expression));
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (2)
CodeGeneration\SyntaxGeneratorTests.vb (2)
490VerifySyntax(Of ThrowStatementSyntax)(Generator.ThrowStatement(), "Throw") 491VerifySyntax(Of ThrowStatementSyntax)(Generator.ThrowStatement(Generator.IdentifierName("x")), "Throw x")
Microsoft.CodeAnalysis.Workspaces (3)
CodeGenerationHelpers.cs (1)
37return factory.ThrowStatement(exceptionCreationExpression);
Shared\Extensions\SyntaxGeneratorExtensions.cs (1)
200=> factory.ThrowStatement(CreateNewArgumentNullException(factory, compilation, parameter));
SyntaxGeneratorExtensions.cs (1)
24return codeDefinitionFactory.ThrowStatement(