2 overrides of ThrowStatement
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
3110public override SyntaxNode ThrowStatement(SyntaxNode? expression = null)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
374Public Overrides Function ThrowStatement(Optional expressionOpt As SyntaxNode = Nothing) As SyntaxNode
17 references to ThrowStatement
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
34return factory.ThrowStatement(exceptionCreationExpression);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
33return codeDefinitionFactory.ThrowStatement( 452=> factory.ThrowStatement(CreateNewArgumentNullException(factory, compilation, parameter));
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (2)
CodeGeneration\SyntaxGeneratorTests.cs (2)
552VerifySyntax<ThrowStatementSyntax>(Generator.ThrowStatement(), "throw;"); 553VerifySyntax<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 (3)
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (1)
400var throwStatement = (TStatementSyntax)generator.ThrowStatement(CreateArgumentException(compilation, generator, parameter, methodName));
InlineMethod\AbstractInlineMethodRefactoringProvider.cs (1)
460.ThrowStatement(_syntaxFacts.GetExpressionOfThrowExpression(inlineMethodContext.InlineExpression));
ReplaceConditionalWithStatements\AbstractReplaceConditionalWithStatementsCodeRefactoringProvider.cs (1)
298return 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)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
34return factory.ThrowStatement(exceptionCreationExpression);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
33return codeDefinitionFactory.ThrowStatement( 452=> factory.ThrowStatement(CreateNewArgumentNullException(factory, compilation, parameter));
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\CustomMarshallerAttributeFixer.cs (1)
569return generator.ThrowStatement(generator.ObjectCreationExpression(