99 references to ExceptionUtilities
Microsoft.CodeAnalysis.CodeStyle (99)
src\Analyzers\Core\Analyzers\AddRequiredParentheses\AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (1)
55
_ => throw
ExceptionUtilities
.UnexpectedValue(precedenceKind),
src\Analyzers\Core\Analyzers\ParenthesesDiagnosticAnalyzersHelper.cs (1)
31
_ => throw
ExceptionUtilities
.UnexpectedValue(precedenceKind),
src\Analyzers\Core\Analyzers\QualifyMemberAccess\AbstractQualifyMemberAccessDiagnosticAnalyzer.cs (3)
73
throw
ExceptionUtilities
.UnexpectedValue(context.Operation);
113
_ => throw
ExceptionUtilities
.UnexpectedValue(operation),
144
_ => throw
ExceptionUtilities
.UnexpectedValue(operation),
src\Analyzers\Core\Analyzers\SimplifyTypeNames\SimplifyTypeNamesDiagnosticAnalyzerBase.cs (1)
160
throw
ExceptionUtilities
.UnexpectedValue(diagnosticId);
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (2)
649
throw
ExceptionUtilities
.Unreachable();
659
throw
ExceptionUtilities
.Unreachable();
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (3)
314
_ => throw
ExceptionUtilities
.Unreachable(),
376
throw
ExceptionUtilities
.Unreachable();
429
throw
ExceptionUtilities
.Unreachable();
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
228
throw
ExceptionUtilities
.UnexpectedValue(_scope);
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
185
throw
ExceptionUtilities
.UnexpectedValue(kind);
src\Compilers\Core\Portable\InternalUtilities\FailFast.cs (2)
43
throw
ExceptionUtilities
.Unreachable(); // to satisfy [DoesNotReturn]
53
throw
ExceptionUtilities
.Unreachable(); // to satisfy [DoesNotReturn]
src\Compilers\Core\Portable\InternalUtilities\FatalError.cs (2)
142
if (
ExceptionUtilities
.IsCurrentOperationBeingCancelled(exception, contextCancellationToken) || exception is OperationCanceledIgnoringCallerTokenException)
218
if (
ExceptionUtilities
.IsCurrentOperationBeingCancelled(exception, contextCancellationToken) || exception is OperationCanceledIgnoringCallerTokenException)
src\Compilers\Core\Portable\InternalUtilities\ReadOnlyMemoryOfCharComparer.cs (1)
51
=> throw
ExceptionUtilities
.Unreachable();
src\Compilers\Core\Portable\InternalUtilities\SingleInitNullable.cs (2)
76
return ReadIfInitialized() ?? throw
ExceptionUtilities
.Unreachable();
79
throw
ExceptionUtilities
.UnexpectedValue(unexpectedValue);
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
182
_ => throw
ExceptionUtilities
.UnexpectedValue(kind)
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (2)
270
throw Roslyn.Utilities.
ExceptionUtilities
.UnexpectedValue(specialType);
389
_ => throw
ExceptionUtilities
.UnexpectedValue(enumUnderlyingType),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\NotificationOption2.cs (2)
55
_ => throw
ExceptionUtilities
.UnexpectedValue(reportDiagnostic)
65
_ => throw
ExceptionUtilities
.UnexpectedValue(severity)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\MutableIntervalTree`1.Node.cs (1)
57
throw
ExceptionUtilities
.Unreachable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (2)
145
throw
ExceptionUtilities
.UnexpectedValue(tokenKind);
270
throw
ExceptionUtilities
.UnexpectedValue(lastChar);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions.cs (1)
20
_ => throw
ExceptionUtilities
.UnexpectedValue(severity),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions_Shared.cs (2)
29
_ => throw
ExceptionUtilities
.UnexpectedValue(diagnosticSeverity),
40
_ => throw
ExceptionUtilities
.UnexpectedValue(diagnosticSeverity)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (3)
168
throw
ExceptionUtilities
.UnexpectedValue(symbol.Kind);
238
throw
ExceptionUtilities
.UnexpectedValue(declaredAccessibility);
324
throw
ExceptionUtilities
.UnexpectedValue(declaredAccessibility);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ReportDiagnosticExtensions.cs (3)
46
throw
ExceptionUtilities
.UnexpectedValue(reportDiagnostic);
80
_ => throw
ExceptionUtilities
.UnexpectedValue(reportDiagnostic)
94
_ => throw
ExceptionUtilities
.UnexpectedValue(reportDiagnostic),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
192
throw
ExceptionUtilities
.Unreachable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (4)
249
throw
ExceptionUtilities
.UnexpectedValue(branch.Semantics);
342
throw
ExceptionUtilities
.UnexpectedValue(enclosing.Kind);
361
throw
ExceptionUtilities
.Unreachable();
397
throw
ExceptionUtilities
.UnexpectedValue(@catch.Kind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\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();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (2)
455
throw
ExceptionUtilities
.Unreachable();
563
throw
ExceptionUtilities
.Unreachable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (1)
67
throw
ExceptionUtilities
.Unreachable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (1)
181
throw
ExceptionUtilities
.Unreachable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (1)
105
_commonRoot = startToken.GetCommonRoot(endToken) ?? throw
ExceptionUtilities
.Unreachable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (1)
285
throw
ExceptionUtilities
.UnexpectedValue(operation.Option);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.AbstractComplexTrivia.cs (2)
70
throw
ExceptionUtilities
.Unreachable();
112
throw
ExceptionUtilities
.Unreachable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (1)
98
throw
ExceptionUtilities
.Unreachable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
126
throw
ExceptionUtilities
.UnexpectedValue(operation.Option);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (3)
440
throw
ExceptionUtilities
.UnexpectedValue(lineOperation.Option);
580
_ => throw
ExceptionUtilities
.UnexpectedValue(rule.IndentationOperation),
589
_ => throw
ExceptionUtilities
.UnexpectedValue(rule.SpaceOperation),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_NamingStyle.cs (1)
197
_ => throw
ExceptionUtilities
.UnexpectedValue(capitalization),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (6)
375
throw
ExceptionUtilities
.UnexpectedValue(symbol);
408
throw
ExceptionUtilities
.UnexpectedValue(symbol);
438
throw
ExceptionUtilities
.UnexpectedValue(symbol);
441
throw
ExceptionUtilities
.UnexpectedValue(symbol);
499
throw
ExceptionUtilities
.UnexpectedValue(accessibility);
552
throw
ExceptionUtilities
.UnexpectedValue(modifier);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
378
_ => throw
ExceptionUtilities
.Unreachable()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (2)
87
throw
ExceptionUtilities
.UnexpectedValue(typeof(T));
118
serializeValue: value => map.TryGetKey(value, out var key) ? key : throw
ExceptionUtilities
.UnexpectedValue(value));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectReader.cs (7)
114
throw
ExceptionUtilities
.UnexpectedValue(b);
118
throw
ExceptionUtilities
.UnexpectedValue(b);
142
public string ReadRequiredString() => ReadString() ?? throw
ExceptionUtilities
.Unreachable();
215
throw
ExceptionUtilities
.UnexpectedValue(code);
237
throw
ExceptionUtilities
.UnexpectedValue(code);
303
throw
ExceptionUtilities
.UnexpectedValue(marker);
320
_ => throw
ExceptionUtilities
.UnexpectedValue(kind),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
249
throw
ExceptionUtilities
.UnexpectedValue(value.GetType());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\TextEncodingKind.cs (1)
54
_ => throw
ExceptionUtilities
.UnexpectedValue(kind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.ErrorTypeSymbolKey.cs (1)
139
throw
ExceptionUtilities
.UnexpectedValue(type);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamespaceSymbolKey.cs (1)
70
_ => throw
ExceptionUtilities
.UnexpectedValue(containerKind),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
718
throw
ExceptionUtilities
.UnexpectedValue(kind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (4)
351
=> throw
ExceptionUtilities
.Unreachable();
354
=> throw
ExceptionUtilities
.Unreachable();
357
=> throw
ExceptionUtilities
.Unreachable();
386
throw
ExceptionUtilities
.Unreachable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
445
throw
ExceptionUtilities
.Unreachable();
449
throw
ExceptionUtilities
.Unreachable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EventMap.cs (1)
176
throw
ExceptionUtilities
.Unreachable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (1)
326
throw
ExceptionUtilities
.Unreachable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SyntaxPath.cs (1)
83
throw
ExceptionUtilities
.Unreachable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
165
throw
ExceptionUtilities
.Unreachable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskFactoryExtensions.cs (2)
29
throw
ExceptionUtilities
.Unreachable();
47
throw
ExceptionUtilities
.Unreachable();