194 references to ExceptionUtilities
Microsoft.CodeAnalysis.CodeStyle (84)
AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (1)
56_ => throw ExceptionUtilities.UnexpectedValue(precedenceKind),
AbstractFormatEngine.cs (1)
75_commonRoot = startToken.GetCommonRoot(endToken) ?? throw ExceptionUtilities.Unreachable();
AbstractFormatEngine.OperationApplier.cs (1)
294throw ExceptionUtilities.UnexpectedValue(operation.Option);
AbstractQualifyMemberAccessDiagnosticAnalyzer.cs (3)
79throw ExceptionUtilities.UnexpectedValue(context.Operation); 119_ => throw ExceptionUtilities.UnexpectedValue(operation), 150_ => throw ExceptionUtilities.UnexpectedValue(operation),
AbstractTriviaDataFactory.AbstractComplexTrivia.cs (2)
74throw ExceptionUtilities.Unreachable(); 116throw ExceptionUtilities.Unreachable();
AbstractTriviaFormatter.cs (3)
440throw ExceptionUtilities.UnexpectedValue(lineOperation.Option); 580_ => throw ExceptionUtilities.UnexpectedValue(rule.IndentationOperation), 589_ => throw ExceptionUtilities.UnexpectedValue(rule.SpaceOperation),
AsyncLazy`1.cs (2)
432throw ExceptionUtilities.Unreachable(); 436throw ExceptionUtilities.Unreachable();
BaseIndentationFormattingRule.cs (1)
126throw ExceptionUtilities.UnexpectedValue(operation.Option);
BottomUpBaseIndentationFinder.cs (1)
181throw ExceptionUtilities.Unreachable();
CustomDataFlowAnalysis.cs (4)
249throw ExceptionUtilities.UnexpectedValue(branch.Semantics); 342throw ExceptionUtilities.UnexpectedValue(enclosing.Kind); 361throw ExceptionUtilities.Unreachable(); 397throw ExceptionUtilities.UnexpectedValue(@catch.Kind);
DiagnosticSeverityExtensions.cs (2)
29_ => throw ExceptionUtilities.UnexpectedValue(diagnosticSeverity), 40_ => throw ExceptionUtilities.UnexpectedValue(diagnosticSeverity)
EditorConfigNamingStyleParser_NamingStyle.cs (1)
197_ => throw ExceptionUtilities.UnexpectedValue(capitalization),
EditorConfigNamingStyleParser_SymbolSpec.cs (6)
380throw ExceptionUtilities.UnexpectedValue(symbol); 413throw ExceptionUtilities.UnexpectedValue(symbol); 443throw ExceptionUtilities.UnexpectedValue(symbol); 446throw ExceptionUtilities.UnexpectedValue(symbol); 504throw ExceptionUtilities.UnexpectedValue(accessibility); 557throw ExceptionUtilities.UnexpectedValue(modifier);
EditorConfigValueSerializer.cs (1)
85throw ExceptionUtilities.UnexpectedValue(typeof(T));
EventMap.cs (1)
180throw ExceptionUtilities.Unreachable();
FailFast.cs (2)
43throw ExceptionUtilities.Unreachable(); // to satisfy [DoesNotReturn] 53throw ExceptionUtilities.Unreachable(); // to satisfy [DoesNotReturn]
FatalError.cs (2)
140if (ExceptionUtilities.IsCurrentOperationBeingCancelled(exception, contextCancellationToken) || exception is OperationCanceledIgnoringCallerTokenException) 216if (ExceptionUtilities.IsCurrentOperationBeingCancelled(exception, contextCancellationToken) || exception is OperationCanceledIgnoringCallerTokenException)
FileUtilities.cs (1)
184throw ExceptionUtilities.UnexpectedValue(kind);
IntervalTree`1.Node.cs (1)
57throw ExceptionUtilities.Unreachable();
ISymbolExtensions_Accessibility.cs (3)
174throw ExceptionUtilities.UnexpectedValue(symbol.Kind); 244throw ExceptionUtilities.UnexpectedValue(declaredAccessibility); 330throw ExceptionUtilities.UnexpectedValue(declaredAccessibility);
J\s\src\Compilers\Core\Portable\SpecialTypeExtensions.cs\SpecialTypeExtensions.cs (1)
269throw Roslyn.Utilities.ExceptionUtilities.UnexpectedValue(specialType);
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs\TaskExtensions.cs (1)
165throw ExceptionUtilities.Unreachable();
ObjectReader.cs (6)
146throw ExceptionUtilities.UnexpectedValue(b); 157throw ExceptionUtilities.UnexpectedValue(b); 309throw ExceptionUtilities.UnexpectedValue(code); 379throw ExceptionUtilities.UnexpectedValue(marker); 406throw ExceptionUtilities.UnexpectedValue(kind); 507throw ExceptionUtilities.UnexpectedValue(kind);
ObjectWriter.cs (2)
237throw ExceptionUtilities.UnexpectedValue(value.GetType()); 671throw ExceptionUtilities.UnexpectedValue(kind);
ParenthesesDiagnosticAnalyzersHelper.cs (1)
25_ => throw ExceptionUtilities.UnexpectedValue(precedenceKind),
ReportDiagnosticExtensions.cs (3)
46throw ExceptionUtilities.UnexpectedValue(reportDiagnostic); 80_ => throw ExceptionUtilities.UnexpectedValue(reportDiagnostic) 105throw ExceptionUtilities.UnexpectedValue(reportDiagnostic);
SectionMatcher_TryParseSection.cs (2)
145throw ExceptionUtilities.UnexpectedValue(tokenKind); 270throw ExceptionUtilities.UnexpectedValue(lastChar);
SimplifyTypeNamesDiagnosticAnalyzerBase.cs (1)
159throw ExceptionUtilities.UnexpectedValue(diagnosticId);
SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
228throw ExceptionUtilities.UnexpectedValue(_scope);
SymbolKey.ErrorTypeSymbolKey.cs (1)
139throw ExceptionUtilities.UnexpectedValue(type);
SymbolKey.NamespaceSymbolKey.cs (1)
70_ => throw ExceptionUtilities.UnexpectedValue(containerKind),
SymbolKey.SymbolKeyReader.cs (1)
736throw ExceptionUtilities.UnexpectedValue(kind);
SymbolKey.SymbolKeyWriter.cs (4)
351=> throw ExceptionUtilities.Unreachable(); 354=> throw ExceptionUtilities.Unreachable(); 357=> throw ExceptionUtilities.Unreachable(); 386throw ExceptionUtilities.Unreachable();
SymbolSpecification.cs (1)
411_ => throw ExceptionUtilities.Unreachable()
SymbolUsageAnalysis.OperationTreeAnalysisData.cs (10)
60=> throw ExceptionUtilities.Unreachable(); 63=> throw ExceptionUtilities.Unreachable(); 65=> throw ExceptionUtilities.Unreachable(); 67=> throw ExceptionUtilities.Unreachable(); 69=> throw ExceptionUtilities.Unreachable(); 73=> throw ExceptionUtilities.Unreachable(); 75=> throw ExceptionUtilities.Unreachable(); 77=> throw ExceptionUtilities.Unreachable(); 79=> throw ExceptionUtilities.Unreachable(); 81=> throw ExceptionUtilities.Unreachable();
SymbolUsageAnalysis.Walker.cs (2)
427throw ExceptionUtilities.Unreachable(); 535throw ExceptionUtilities.Unreachable();
SymbolUsageResult.cs (1)
72throw ExceptionUtilities.Unreachable();
SyntaxPath.cs (1)
83throw ExceptionUtilities.Unreachable();
TaskFactoryExtensions.cs (2)
29throw ExceptionUtilities.Unreachable(); 47throw ExceptionUtilities.Unreachable();
TemporaryArray`1.cs (2)
242_ => throw ExceptionUtilities.Unreachable(), 304throw ExceptionUtilities.Unreachable();
TextEncodingKind.cs (1)
54_ => throw ExceptionUtilities.UnexpectedValue(kind)
Microsoft.CodeAnalysis.CodeStyle.Fixes (12)
AbstractConflictMarkerCodeFixProvider.cs (2)
197throw ExceptionUtilities.UnexpectedValue(text[position]); 426throw ExceptionUtilities.UnexpectedValue(equivalenceKey);
AbstractPopulateSwitchExpressionCodeFixProvider.cs (1)
44=> switchExpression.Value.Type ?? throw ExceptionUtilities.Unreachable();
AbstractPopulateSwitchStatementCodeFixProvider.cs (1)
60=> switchOperation.Value.Type ?? throw ExceptionUtilities.Unreachable();
AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
367throw ExceptionUtilities.Unreachable();
CodeGenerationOperatorSymbol.cs (2)
83throw ExceptionUtilities.UnexpectedValue(operatorKind); 119_ => throw ExceptionUtilities.UnexpectedValue(operatorKind),
FixAllHelper.cs (1)
26_ => throw ExceptionUtilities.UnexpectedValue(fixAllScope),
SyntaxGeneratorExtensions_Negate.cs (2)
225throw ExceptionUtilities.UnexpectedValue(pattern.RawKind); 373_ => throw ExceptionUtilities.UnexpectedValue(operationKind),
TextDocumentExtensions.cs (1)
29throw ExceptionUtilities.Unreachable();
UseCoalesceExpressionForIfNullStatementCheckCodeFixProvider.cs (1)
78throw ExceptionUtilities.Unreachable();
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (2)
CodeFixVerifierHelper.cs (1)
41throw ExceptionUtilities.UnexpectedValue(property);
NamingStylesTestOptionSets.cs (1)
123throw ExceptionUtilities.UnexpectedValue(symbolOrTypeKind);
Microsoft.CodeAnalysis.CSharp.CodeStyle (22)
AnalyzedPattern.cs (1)
189var v => throw ExceptionUtilities.UnexpectedValue(v)
ConvertNamespaceAnalysis.cs (1)
22_ => throw ExceptionUtilities.UnexpectedValue(preference),
CSharpAddRequiredExpressionParenthesesDiagnosticAnalyzer.cs (1)
72throw ExceptionUtilities.UnexpectedValue(binaryLike);
CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
74_ => throw ExceptionUtilities.Unreachable(),
CSharpBlockFacts.cs (1)
35_ => throw ExceptionUtilities.UnexpectedValue(node),
CSharpCodeStyleOptions_Parsing.cs (1)
139_ => throw ExceptionUtilities.Unreachable(),
CSharpFileHeaderHelper.cs (1)
48throw ExceptionUtilities.UnexpectedValue(commentTrivia.Kind());
CSharpRemoveConfusingSuppressionDiagnosticAnalyzer.cs (1)
37_ => throw ExceptionUtilities.UnexpectedValue(node),
CSharpRemoveUnnecessaryCastDiagnosticAnalyzer.cs (1)
31node is BinaryExpressionSyntax binary ? TextSpan.FromBounds(binary.OperatorToken.SpanStart, node.Span.End) : throw ExceptionUtilities.Unreachable();
CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
275_ => throw ExceptionUtilities.UnexpectedValue(expression.Kind()),
CSharpSyntaxFacts.cs (4)
222_ => throw ExceptionUtilities.UnexpectedValue(node.Kind()), 630=> throw ExceptionUtilities.Unreachable(); 1332_ => throw ExceptionUtilities.UnexpectedValue(node), 1433throw ExceptionUtilities.UnexpectedValue(trivia.Kind());
CSharpTriviaFormatter.cs (1)
396throw ExceptionUtilities.Unreachable();
CSharpUseAutoPropertyAnalyzer.cs (1)
180_ => throw ExceptionUtilities.Unreachable(),
CSharpUsePatternCombinatorsAnalyzer.cs (1)
155var v => throw ExceptionUtilities.UnexpectedValue(v)
ParenthesizedExpressionSyntaxExtensions.cs (1)
455throw ExceptionUtilities.Unreachable();
SpeculationAnalyzer.cs (1)
239throw ExceptionUtilities.UnexpectedValue(originalLambda.Kind());
TokenBasedFormattingRule.cs (1)
251_ => throw ExceptionUtilities.UnexpectedValue(node.Kind()),
TriviaDataFactory.CodeShapeAnalyzer.cs (1)
221throw ExceptionUtilities.Unreachable();
Utilities.cs (1)
37throw ExceptionUtilities.UnexpectedValue(assignmentExpressionKind);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (31)
ConvertNamespaceCodeFixProvider.cs (1)
49_ => throw ExceptionUtilities.UnexpectedValue(diagnostic.Id),
ConvertNamespaceTransform.cs (1)
41throw ExceptionUtilities.UnexpectedValue(baseNamespace.Kind());
ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (2)
176throw ExceptionUtilities.UnexpectedValue(value); 299=> throw ExceptionUtilities.UnexpectedValue(node.Kind());
CSharpAddImportsService.cs (1)
174var rewritten = (CompilationUnitSyntax)(base.VisitCompilationUnit(node) ?? throw ExceptionUtilities.Unreachable());
CSharpAsAndMemberAccessCodeFixProvider.cs (1)
140_ => throw ExceptionUtilities.Unreachable()
CSharpDeclarationComparer.cs (1)
152throw ExceptionUtilities.UnexpectedValue(x.Kind());
CSharpMakeMemberRequiredCodeFixProvider.cs (1)
103_ => throw ExceptionUtilities.Unreachable(),
CSharpRemoveAsyncModifierCodeFixProvider.cs (1)
46_ => throw ExceptionUtilities.Unreachable()
CSharpRemoveConfusingSuppressionCodeFixProvider.cs (1)
87_ => throw ExceptionUtilities.UnexpectedValue(node),
CSharpRemoveUnnecessaryCastCodeFixProvider.cs (1)
90throw ExceptionUtilities.UnexpectedValue(old);
CSharpRemoveUnusedValuesCodeFixProvider.cs (1)
202throw ExceptionUtilities.Unreachable();
CSharpSyntaxGeneratorInternal.cs (3)
131_ => throw ExceptionUtilities.UnexpectedValue(refKind), 142_ => throw ExceptionUtilities.UnexpectedValue(negatedKind), 146=> throw ExceptionUtilities.Unreachable();
CSharpUseLocalFunctionCodeFixProvider.cs (1)
288throw ExceptionUtilities.UnexpectedValue(anonymousFunction);
CSharpUseNullCheckOverTypeCheckCodeFixProvider.cs (1)
61_ => throw ExceptionUtilities.Unreachable()
CSharpUsePatternCombinatorsCodeFixProvider.cs (2)
50_ => throw ExceptionUtilities.UnexpectedValue(kind) 111var p => throw ExceptionUtilities.UnexpectedValue(p)
CSharpUseRangeOperatorCodeFixProvider.cs (1)
132_ => throw ExceptionUtilities.Unreachable(),
ExpressionGenerator.cs (1)
268? (integerMinValueString ?? throw ExceptionUtilities.Unreachable())
ITypeSymbolExtensions.cs (2)
63_ => throw ExceptionUtilities.UnexpectedValue(type.NullableAnnotation), 138throw ExceptionUtilities.Unreachable();
ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
146_ => throw ExceptionUtilities.UnexpectedValue(symbol.Signature.CallingConvention),
MisplacedUsingDirectivesCodeFixProvider.cs (1)
313_ => throw ExceptionUtilities.UnexpectedValue(node)
PositionalParameterInfo.cs (1)
69_ => throw ExceptionUtilities.Unreachable(),
UseExplicitTypeCodeFixProvider.cs (3)
81throw ExceptionUtilities.UnexpectedValue(declarationContext?.Kind()); 191throw ExceptionUtilities.UnexpectedValue(designation.Kind()); 226throw ExceptionUtilities.UnexpectedValue(typeSymbol);
UseUtf8StringLiteralCodeFixProvider.cs (2)
105throw ExceptionUtilities.Unreachable(); 139throw ExceptionUtilities.Unreachable();
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (14)
CSharpRemoveRedundantNullableDirectiveTests.cs (2)
229_ => throw ExceptionUtilities.UnexpectedValue(options), 240_ => throw ExceptionUtilities.UnexpectedValue(options),
CSharpRemoveUnnecessaryNullableDirectiveTests.cs (1)
227_ => throw ExceptionUtilities.UnexpectedValue(options),
RemoveUnusedValueAssignmentTests.cs (11)
496_ => throw ExceptionUtilities.Unreachable(), 554_ => throw ExceptionUtilities.Unreachable(), 1069_ => throw ExceptionUtilities.Unreachable(), 1164_ => throw ExceptionUtilities.Unreachable(), 1243_ => throw ExceptionUtilities.Unreachable(), 1360_ => throw ExceptionUtilities.Unreachable(), 2574_ => throw ExceptionUtilities.Unreachable(), 2773_ => throw ExceptionUtilities.Unreachable() 2898_ => throw ExceptionUtilities.Unreachable(), 3049_ => throw ExceptionUtilities.Unreachable(), 7808_ => throw ExceptionUtilities.Unreachable(),
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (13)
BaseFormattingRule.vb (2)
74Throw ExceptionUtilities.Unreachable 79Throw ExceptionUtilities.Unreachable
SpeculationAnalyzer.vb (1)
274Throw ExceptionUtilities.UnexpectedValue(originalLambda.Kind)
SyntaxNodeExtensions.vb (2)
209Throw ExceptionUtilities.UnexpectedValue(node) 675Throw ExceptionUtilities.Unreachable
TriviaDataFactory.AbstractLineBreakTrivia.vb (2)
32throw ExceptionUtilities.Unreachable 39throw ExceptionUtilities.Unreachable
TriviaDataFactory.CodeShapeAnalyzer.vb (1)
234throw ExceptionUtilities.UnexpectedValue(trivia.Kind)
VisualBasicFileHeaderHelper.vb (1)
26Throw ExceptionUtilities.UnexpectedValue(commentTrivia.Kind())
VisualBasicRemoveUnnecessaryCastDiagnosticAnalyzer.vb (1)
31Throw ExceptionUtilities.UnexpectedValue(node.Kind)
VisualBasicSyntaxFacts.vb (3)
569Throw ExceptionUtilities.UnexpectedValue(node.Kind()) 1407Throw ExceptionUtilities.UnexpectedValue(node) 1593Throw ExceptionUtilities.Unreachable
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (16)
SyntaxTreeExtensions.vb (1)
1032Throw ExceptionUtilities.Unreachable
VisualBasicConvertGetTypeToNameOfCodeFixProvider.vb (1)
47Throw ExceptionUtilities.Unreachable
VisualBasicRemoveAsyncModifierCodeFixProvider.vb (1)
56Throw ExceptionUtilities.Unreachable
VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (1)
160Throw ExceptionUtilities.UnexpectedValue(old)
VisualBasicRemoveUnusedValuesCodeFixProvider.vb (5)
34Throw ExceptionUtilities.Unreachable 39Throw ExceptionUtilities.Unreachable 58Throw ExceptionUtilities.Unreachable 63Throw ExceptionUtilities.Unreachable 68Throw ExceptionUtilities.Unreachable
VisualBasicSyntaxGeneratorInternal.vb (1)
141Throw ExceptionUtilities.UnexpectedValue(negatedKind)
VisualBasicUseCompoundAssignmentCodeFixProvider.vb (2)
34Throw ExceptionUtilities.Unreachable 38Throw ExceptionUtilities.Unreachable
VisualBasicUseConditionalExpressionForAssignmentCodeFixProvider.vb (1)
32Throw ExceptionUtilities.Unreachable
VisualBasicUseConditionalExpressionForReturnCodeFixProvider.vb (1)
32Throw ExceptionUtilities.Unreachable
VisualBasicUseNullPropagationCodeFixProvider.vb (2)
39Throw ExceptionUtilities.Unreachable() 43Throw ExceptionUtilities.Unreachable()