Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
04b333ce
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
04b333ce
编写于
2月 07, 2017
作者:
C
CyrusNajmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Pass along the value that was unexpected when we encounter one.
上级
7f38544a
变更
40
隐藏空白更改
内联
并排
Showing
40 changed file
with
100 addition
and
101 deletion
+100
-101
src/Compilers/VisualBasic/Portable/Syntax/LambdaUtilities.vb
src/Compilers/VisualBasic/Portable/Syntax/LambdaUtilities.vb
+2
-2
src/EditorFeatures/CSharp/AutomaticCompletion/CSharpBraceCompletionSessionProvider.cs
...tomaticCompletion/CSharpBraceCompletionSessionProvider.cs
+2
-2
src/EditorFeatures/Core/Implementation/InlineRename/IEditorInlineRenameService.cs
...Implementation/InlineRename/IEditorInlineRenameService.cs
+1
-1
src/EditorFeatures/Core/Implementation/InlineRename/InlineRenameSession.OpenTextBufferManager.cs
...InlineRename/InlineRenameSession.OpenTextBufferManager.cs
+1
-1
src/EditorFeatures/Core/Implementation/InlineRename/Taggers/RenameTagger.cs
.../Core/Implementation/InlineRename/Taggers/RenameTagger.cs
+1
-1
src/EditorFeatures/Core/Implementation/IntelliSense/Completion/FileSystem/FileSystemCompletionHelper.cs
...Sense/Completion/FileSystem/FileSystemCompletionHelper.cs
+1
-1
src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Presentation/ClassificationTags.cs
...ntelliSense/Completion/Presentation/ClassificationTags.cs
+1
-1
src/EditorFeatures/VisualBasic/AutomaticCompletion/VisualBasicBraceCompletionSessionProvider.vb
...icCompletion/VisualBasicBraceCompletionSessionProvider.vb
+2
-3
src/Features/CSharp/Portable/CodeFixes/SimplifyTypeNames/SimplifyTypeNamesCodeFixProvider.cs
...xes/SimplifyTypeNames/SimplifyTypeNamesCodeFixProvider.cs
+1
-1
src/Features/CSharp/Portable/EditAndContinue/CSharpEditAndContinueAnalyzer.cs
...Portable/EditAndContinue/CSharpEditAndContinueAnalyzer.cs
+4
-4
src/Features/CSharp/Portable/EditAndContinue/StatementSyntaxComparer.cs
...Sharp/Portable/EditAndContinue/StatementSyntaxComparer.cs
+2
-2
src/Features/Core/Portable/CodeFixes/Suppression/SuppressionHelpers.cs
...Core/Portable/CodeFixes/Suppression/SuppressionHelpers.cs
+1
-1
src/Features/Core/Portable/CodeRefactorings/MoveType/AbstractMoveTypeService.MoveTypeCodeAction.cs
...gs/MoveType/AbstractMoveTypeService.MoveTypeCodeAction.cs
+4
-4
src/Features/Core/Portable/Common/TaggedText.cs
src/Features/Core/Portable/Common/TaggedText.cs
+1
-1
src/Features/Core/Portable/Completion/Providers/AbstractOverrideCompletionProvider.cs
...ompletion/Providers/AbstractOverrideCompletionProvider.cs
+1
-1
src/Features/Core/Portable/Diagnostics/AnalyzerHelper.cs
src/Features/Core/Portable/Diagnostics/AnalyzerHelper.cs
+1
-1
src/Features/Core/Portable/Diagnostics/Analyzers/SimplifyTypeNamesDiagnosticAnalyzerBase.cs
...tics/Analyzers/SimplifyTypeNamesDiagnosticAnalyzerBase.cs
+1
-1
src/Features/Core/Portable/EditAndContinue/AbstractEditAndContinueAnalyzer.cs
...rtable/EditAndContinue/AbstractEditAndContinueAnalyzer.cs
+2
-2
src/Features/Core/Portable/GenerateMember/GenerateParameterizedMember/AbstractGenerateParameterizedMemberService.CodeAction.cs
.../AbstractGenerateParameterizedMemberService.CodeAction.cs
+1
-1
src/Features/Core/Portable/MetadataAsSource/AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs
...AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs
+3
-2
src/Features/Core/Portable/QualifyMemberAccess/AbstractQualifyMemberAccessDiagnosticAnalyzer.cs
...erAccess/AbstractQualifyMemberAccessDiagnosticAnalyzer.cs
+1
-1
src/Features/Core/Portable/SolutionCrawler/WorkCoordinator.cs
...Features/Core/Portable/SolutionCrawler/WorkCoordinator.cs
+4
-4
src/Features/VisualBasic/Portable/CodeFixes/IncorrectExitContinue/IncorrectExitContinueCodeFixProvider.vb
...rrectExitContinue/IncorrectExitContinueCodeFixProvider.vb
+2
-2
src/Features/VisualBasic/Portable/CodeFixes/SimplifyTypeNames/SimplifyTypeNamesCodeFixProvider.vb
...xes/SimplifyTypeNames/SimplifyTypeNamesCodeFixProvider.vb
+1
-1
src/Features/VisualBasic/Portable/Completion/KeywordRecommenders/RecommendationHelpers.vb
...e/Completion/KeywordRecommenders/RecommendationHelpers.vb
+1
-1
src/Features/VisualBasic/Portable/Diagnostics/Analyzers/VisualBasicRemoveUnnecessaryCastDiagnosticAnalyzer.vb
...ers/VisualBasicRemoveUnnecessaryCastDiagnosticAnalyzer.vb
+2
-2
src/Features/VisualBasic/Portable/EditAndContinue/VisualBasicEditAndContinueAnalyzer.vb
...ble/EditAndContinue/VisualBasicEditAndContinueAnalyzer.vb
+6
-6
src/VisualStudio/Core/Def/Implementation/EditAndContinue/VsENCRebuildableProjectImpl.cs
...ementation/EditAndContinue/VsENCRebuildableProjectImpl.cs
+1
-1
src/VisualStudio/Core/Def/Implementation/Progression/GraphBuilder.cs
...tudio/Core/Def/Implementation/Progression/GraphBuilder.cs
+1
-1
src/VisualStudio/VisualBasic/Impl/ProjectSystemShim/VisualBasicProjectOptionsHelper.vb
...Impl/ProjectSystemShim/VisualBasicProjectOptionsHelper.vb
+1
-1
src/Workspaces/CSharp/Portable/Extensions/BaseParameterListSyntaxExtensions.cs
.../Portable/Extensions/BaseParameterListSyntaxExtensions.cs
+2
-2
src/Workspaces/CSharp/Portable/Extensions/TypeDeclarationSyntaxExtensions.cs
...rp/Portable/Extensions/TypeDeclarationSyntaxExtensions.cs
+20
-20
src/Workspaces/Core/Portable/CodeFixes/FixAllOccurrences/FixAllState.cs
.../Core/Portable/CodeFixes/FixAllOccurrences/FixAllState.cs
+1
-1
src/Workspaces/Core/Portable/Formatting/Rules/BaseIndentationFormattingRule.cs
...ortable/Formatting/Rules/BaseIndentationFormattingRule.cs
+1
-1
src/Workspaces/Core/Portable/Formatting/TriviaEngine/AbstractTriviaFormatter.cs
...rtable/Formatting/TriviaEngine/AbstractTriviaFormatter.cs
+3
-3
src/Workspaces/Core/Portable/Shared/Extensions/ISymbolExtensions_Accessibility.cs
...able/Shared/Extensions/ISymbolExtensions_Accessibility.cs
+3
-3
src/Workspaces/VisualBasic/Portable/CodeCleanup/Providers/ReduceTokensCodeCleanupProvider.vb
.../CodeCleanup/Providers/ReduceTokensCodeCleanupProvider.vb
+2
-2
src/Workspaces/VisualBasic/Portable/CodeGeneration/ExpressionGenerator.StringPiece.vb
...ortable/CodeGeneration/ExpressionGenerator.StringPiece.vb
+2
-2
src/Workspaces/VisualBasic/Portable/Extensions/MethodBaseSyntaxExtensions.vb
...alBasic/Portable/Extensions/MethodBaseSyntaxExtensions.vb
+1
-2
src/Workspaces/VisualBasic/Portable/Extensions/TypeBlockSyntaxExtensions.vb
...ualBasic/Portable/Extensions/TypeBlockSyntaxExtensions.vb
+12
-12
未找到文件。
src/Compilers/VisualBasic/Portable/Syntax/LambdaUtilities.vb
浏览文件 @
04b333ce
...
...
@@ -88,7 +88,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Return
If
(
oldJoinCondition
.
Left
Is
oldBody
,
GetJoinLeftLambdaBody
(
newJoinClause
),
GetJoinRightLambdaBody
(
newJoinClause
))
Case
Else
Throw
ExceptionUtilities
.
Un
reachable
Throw
ExceptionUtilities
.
Un
expectedValue
(
oldLambda
.
Kind
)
End
Select
End
Function
...
...
@@ -587,7 +587,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Return
DirectCast
(
clause
,
JoinClauseSyntax
).
JoinedVariables
Case
Else
Throw
ExceptionUtilities
.
Un
reachable
Throw
ExceptionUtilities
.
Un
expectedValue
(
clause
.
Kind
)
End
Select
End
Function
...
...
src/EditorFeatures/CSharp/AutomaticCompletion/CSharpBraceCompletionSessionProvider.cs
浏览文件 @
04b333ce
...
...
@@ -80,9 +80,9 @@ protected override IEditorBraceCompletionSession CreateEditorSession(Document do
case
BraceCompletionSessionProvider
.
Parenthesis
.
OpenCharacter
:
return
new
ParenthesisCompletionSession
(
syntaxFactsService
);
case
BraceCompletionSessionProvider
.
SingleQuote
.
OpenCharacter
:
return
new
CharLiteralCompletionSession
(
syntaxFactsService
);
case
BraceCompletionSessionProvider
.
LessAndGreaterThan
.
OpenCharacter
:
return
new
LessAndGreaterThanCompletionSession
(
syntaxFactsService
);
default
:
throw
ExceptionUtilities
.
UnexpectedValue
(
openingBrace
);
}
throw
ExceptionUtilities
.
Unreachable
;
}
}
}
src/EditorFeatures/Core/Implementation/InlineRename/IEditorInlineRenameService.cs
浏览文件 @
04b333ce
...
...
@@ -67,7 +67,7 @@ private static InlineRenameReplacementKind GetReplacementKind(RelatedLocation lo
return
InlineRenameReplacementKind
.
UnresolvedConflict
;
default
:
case
RelatedLocationType
.
PossiblyResolvableConflict
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
location
.
Type
)
;
}
}
}
...
...
src/EditorFeatures/Core/Implementation/InlineRename/InlineRenameSession.OpenTextBufferManager.cs
浏览文件 @
04b333ce
...
...
@@ -553,7 +553,7 @@ private static RenameSpanKind GetRenameSpanKind(InlineRenameReplacementKind kind
return
RenameSpanKind
.
Complexified
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
kind
)
;
}
}
...
...
src/EditorFeatures/Core/Implementation/InlineRename/Taggers/RenameTagger.cs
浏览文件 @
04b333ce
...
...
@@ -30,7 +30,7 @@ protected override bool TryCreateTagSpan(SnapshotSpan span, RenameSpanKind type,
tagKind
=
FixupTag
.
Instance
;
break
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
type
)
;
}
tagSpan
=
new
TagSpan
<
ITextMarkerTag
>(
span
,
tagKind
);
...
...
src/EditorFeatures/Core/Implementation/IntelliSense/Completion/FileSystem/FileSystemCompletionHelper.cs
浏览文件 @
04b333ce
...
...
@@ -161,7 +161,7 @@ private ImmutableArray<CompletionItem> GetFilesAndDirectories(string path, strin
break
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
pathKind
)
;
}
return
result
.
ToImmutableAndFree
();
...
...
src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Presentation/ClassificationTags.cs
浏览文件 @
04b333ce
...
...
@@ -69,7 +69,7 @@ public static string GetClassificationTypeName(string textTag)
return
ClassificationTypeNames
.
Text
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
textTag
)
;
}
}
}
...
...
src/EditorFeatures/VisualBasic/AutomaticCompletion/VisualBasicBraceCompletionSessionProvider.vb
浏览文件 @
04b333ce
...
...
@@ -63,10 +63,9 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.AutomaticCompletion
Else
Return
New
StringLiteralCompletionSession
(
syntaxFactsService
)
End
If
Case
Else
Throw
ExceptionUtilities
.
UnexpectedValue
(
openingBrace
)
End
Select
Throw
ExceptionUtilities
.
Unreachable
End
Function
End
Class
End
Namespace
src/Features/CSharp/Portable/CodeFixes/SimplifyTypeNames/SimplifyTypeNamesCodeFixProvider.cs
浏览文件 @
04b333ce
...
...
@@ -101,7 +101,7 @@ internal static string GetCodeActionId(string diagnosticId, string nodeText)
return
CSharpFeaturesResources
.
Remove_this_qualification
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
diagnosticId
)
;
}
}
...
...
src/Features/CSharp/Portable/EditAndContinue/CSharpEditAndContinueAnalyzer.cs
浏览文件 @
04b333ce
...
...
@@ -1725,7 +1725,7 @@ public void ClassifyEdit()
return
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
_kind
)
;
}
}
...
...
@@ -1793,7 +1793,7 @@ private void ClassifyReorder(SyntaxNode oldNode, SyntaxNode newNode)
return
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
newNode
.
Kind
())
;
}
}
...
...
@@ -2209,7 +2209,7 @@ private void ClassifyUpdate(SyntaxNode oldNode, SyntaxNode newNode)
return
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
newNode
.
Kind
())
;
}
}
...
...
@@ -3039,7 +3039,7 @@ private static ExpressionSyntax GetExpressionFromStatementPart(SyntaxNode statem
return
((
ReturnStatementSyntax
)
statement
).
Expression
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
statement
.
Kind
())
;
}
}
...
...
src/Features/CSharp/Portable/EditAndContinue/StatementSyntaxComparer.cs
浏览文件 @
04b333ce
...
...
@@ -740,7 +740,7 @@ private static void GetLambdaParts(SyntaxNode lambda, out IEnumerable<SyntaxToke
break
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
lambda
.
Kind
())
;
}
}
...
...
@@ -818,7 +818,7 @@ private bool TryComputeWeightedDistance(BlockSyntax leftBlock, BlockSyntax right
return
true
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
leftBlock
.
Parent
.
Kind
())
;
}
}
...
...
src/Features/Core/Portable/CodeFixes/Suppression/SuppressionHelpers.cs
浏览文件 @
04b333ce
...
...
@@ -48,7 +48,7 @@ private static bool CanBeSuppressedOrUnsuppressed(Diagnostic diagnostic, bool ch
return
true
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
diagnostic
.
Severity
)
;
}
}
...
...
src/Features/Core/Portable/CodeRefactorings/MoveType/AbstractMoveTypeService.MoveTypeCodeAction.cs
浏览文件 @
04b333ce
...
...
@@ -42,9 +42,9 @@ private string CreateDisplayText()
return
string
.
Format
(
FeaturesResources
.
Rename_type_to_0
,
_state
.
DocumentName
);
case
OperationKind
.
RenameFile
:
return
string
.
Format
(
FeaturesResources
.
Rename_file_to_0
,
_fileName
);
default
:
throw
ExceptionUtilities
.
UnexpectedValue
(
_operationKind
);
}
throw
ExceptionUtilities
.
Unreachable
;
}
public
override
string
Title
=>
_title
;
...
...
@@ -65,9 +65,9 @@ private Editor GetEditor(CancellationToken cancellationToken)
return
new
RenameTypeEditor
(
_service
,
_state
,
_fileName
,
cancellationToken
);
case
OperationKind
.
RenameFile
:
return
new
RenameFileEditor
(
_service
,
_state
,
_fileName
,
cancellationToken
);
default
:
throw
ExceptionUtilities
.
UnexpectedValue
(
_operationKind
);
}
throw
ExceptionUtilities
.
Unreachable
;
}
internal
override
bool
PerformFinalApplicabilityCheck
=>
true
;
...
...
src/Features/Core/Portable/Common/TaggedText.cs
浏览文件 @
04b333ce
...
...
@@ -139,7 +139,7 @@ public static string ToClassificationTypeName(this string taggedTextTag)
return
ClassificationTypeNames
.
Text
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
taggedTextTag
)
;
}
}
...
...
src/Features/Core/Portable/Completion/Providers/AbstractOverrideCompletionProvider.cs
浏览文件 @
04b333ce
...
...
@@ -112,7 +112,7 @@ protected ITypeSymbol GetReturnType(ISymbol symbol)
case
SymbolKind
.
Property
:
return
((
IPropertySymbol
)
symbol
).
Type
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
symbol
.
Kind
)
;
}
}
}
...
...
src/Features/Core/Portable/Diagnostics/AnalyzerHelper.cs
浏览文件 @
04b333ce
...
...
@@ -85,7 +85,7 @@ public static ReportDiagnostic MapSeverityToReport(this DiagnosticSeverity sever
case
DiagnosticSeverity
.
Error
:
return
ReportDiagnostic
.
Error
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
severity
)
;
}
}
...
...
src/Features/Core/Portable/Diagnostics/Analyzers/SimplifyTypeNamesDiagnosticAnalyzerBase.cs
浏览文件 @
04b333ce
...
...
@@ -147,7 +147,7 @@ protected bool TrySimplifyTypeNameExpression(SemanticModel model, SyntaxNode nod
break
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
diagnosticId
)
;
}
if
(
descriptor
==
null
)
...
...
src/Features/Core/Portable/EditAndContinue/AbstractEditAndContinueAnalyzer.cs
浏览文件 @
04b333ce
...
...
@@ -2117,7 +2117,7 @@ public ConstructorEdit(INamedTypeSymbol oldType)
{
case
EditKind
.
Move
:
// Move is always a Rude Edit.
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
edit
.
Kind
)
;
case
EditKind
.
Delete
:
{
...
...
@@ -2382,7 +2382,7 @@ public ConstructorEdit(INamedTypeSymbol oldType)
break
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
edit
.
Kind
)
;
}
semanticEdits
.
Add
(
new
SemanticEdit
(
editKind
,
oldSymbol
,
newSymbol
,
syntaxMapOpt
,
preserveLocalVariables
:
syntaxMapOpt
!=
null
));
...
...
src/Features/Core/Portable/GenerateMember/GenerateParameterizedMember/AbstractGenerateParameterizedMemberService.CodeAction.cs
浏览文件 @
04b333ce
...
...
@@ -55,7 +55,7 @@ private partial class GenerateParameterizedMemberCodeAction : CodeAction
case
MethodGenerationKind
.
ExplicitConversion
:
return
_service
.
GetExplicitConversionDisplayText
(
_state
);
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
state
.
MethodGenerationKind
)
;
}
}
...
...
src/Features/Core/Portable/MetadataAsSource/AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs
浏览文件 @
04b333ce
...
...
@@ -55,9 +55,10 @@ private static ISymbol WrapMember(ISymbol m, bool canImplementImplicitly, IDocum
case
SymbolKind
.
Property
:
return
new
WrappedPropertySymbol
((
IPropertySymbol
)
m
,
canImplementImplicitly
,
docCommentFormattingService
);
}
throw
ExceptionUtilities
.
Unreachable
;
default
:
throw
ExceptionUtilities
.
UnexpectedValue
(
m
.
Kind
);
}
}
public
bool
IsAnonymousType
=>
_symbol
.
IsAnonymousType
;
...
...
src/Features/Core/Portable/QualifyMemberAccess/AbstractQualifyMemberAccessDiagnosticAnalyzer.cs
浏览文件 @
04b333ce
...
...
@@ -113,7 +113,7 @@ internal static PerLanguageOption<CodeStyleOption<bool>> GetApplicableOptionFrom
case
SymbolKind
.
Event
:
return
CodeStyleOptions
.
QualifyEventAccess
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
symbolKind
)
;
}
}
}
...
...
src/Features/Core/Portable/SolutionCrawler/WorkCoordinator.cs
浏览文件 @
04b333ce
...
...
@@ -248,7 +248,7 @@ private void ProcessEvents(WorkspaceChangeEventArgs args, IAsyncToken asyncToken
ProcessDocumentEvent
(
args
,
asyncToken
);
break
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
args
.
Kind
)
;
}
}
...
...
@@ -290,7 +290,7 @@ private void ProcessDocumentEvent(WorkspaceChangeEventArgs e, IAsyncToken asyncT
break
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
e
.
Kind
)
;
}
}
...
...
@@ -310,7 +310,7 @@ private void ProcessProjectEvent(WorkspaceChangeEventArgs e, IAsyncToken asyncTo
EnqueueEvent
(
e
.
OldSolution
,
e
.
NewSolution
,
e
.
ProjectId
,
asyncToken
);
break
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
e
.
Kind
)
;
}
}
...
...
@@ -333,7 +333,7 @@ private void ProcessSolutionEvent(WorkspaceChangeEventArgs e, IAsyncToken asyncT
EnqueueEvent
(
e
.
OldSolution
,
e
.
NewSolution
,
asyncToken
);
break
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
e
.
Kind
)
;
}
}
...
...
src/Features/VisualBasic/Portable/CodeFixes/IncorrectExitContinue/IncorrectExitContinueCodeFixProvider.vb
浏览文件 @
04b333ce
...
...
@@ -267,7 +267,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.CodeFixes.IncorrectExitContinue
Case
SyntaxKind
.
GetAccessorBlock
,
SyntaxKind
.
SetAccessorBlock
Return
SyntaxKind
.
ExitPropertyStatement
Case
Else
Throw
ExceptionUtilities
.
Un
reachable
Throw
ExceptionUtilities
.
Un
expectedValue
(
blockKind
)
End
Select
End
Function
...
...
@@ -284,7 +284,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.CodeFixes.IncorrectExitContinue
Case
SyntaxKind
.
WhileBlock
Return
SyntaxKind
.
ContinueWhileStatement
Case
Else
Throw
ExceptionUtilities
.
Un
reachable
Throw
ExceptionUtilities
.
Un
expectedValue
(
blockKind
)
End
Select
End
Function
...
...
src/Features/VisualBasic/Portable/CodeFixes/SimplifyTypeNames/SimplifyTypeNamesCodeFixProvider.vb
浏览文件 @
04b333ce
...
...
@@ -88,7 +88,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.CodeFixes.SimplifyTypeNames
Return
String
.
Format
(
VBFeaturesResources
.
Simplify_member_access_0
,
nodeText
)
Case
Else
Throw
ExceptionUtilities
.
Un
reachable
Throw
ExceptionUtilities
.
Un
expectedValue
(
simplifyDiagnosticId
)
End
Select
End
Function
...
...
src/Features/VisualBasic/Portable/Completion/KeywordRecommenders/RecommendationHelpers.vb
浏览文件 @
04b333ce
...
...
@@ -51,7 +51,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Completion.KeywordRecommenders
arrayCreation
.
Initializer
.
CloseBraceToken
,
asNewClause
.
Type
.
GetLastToken
(
includeZeroWidth
:
=
True
))
Case
Else
Throw
ExceptionUtilities
.
Un
reachable
Throw
ExceptionUtilities
.
Un
expectedValue
(
asNewClause
.
NewExpression
.
Kind
)
End
Select
Return
token
=
lastToken
...
...
src/Features/VisualBasic/Portable/Diagnostics/Analyzers/VisualBasicRemoveUnnecessaryCastDiagnosticAnalyzer.vb
浏览文件 @
04b333ce
...
...
@@ -30,7 +30,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Diagnostics.RemoveUnnecessaryCast
Case
SyntaxKind
.
PredefinedCastExpression
Return
DirectCast
(
node
,
PredefinedCastExpressionSyntax
).
IsUnnecessaryCast
(
model
,
assumeCallKeyword
:
=
True
,
cancellationToken
:
=
cancellationToken
)
Case
Else
Throw
ExceptionUtilities
.
Un
reachable
Throw
ExceptionUtilities
.
Un
expectedValue
(
node
.
Kind
)
End
Select
End
Function
...
...
@@ -41,7 +41,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Diagnostics.RemoveUnnecessaryCast
Case
SyntaxKind
.
PredefinedCastExpression
Return
DirectCast
(
node
,
PredefinedCastExpressionSyntax
).
Keyword
.
Span
Case
Else
Throw
ExceptionUtilities
.
Un
reachable
Throw
ExceptionUtilities
.
Un
expectedValue
(
node
.
Kind
)
End
Select
End
Function
End
Class
...
...
src/Features/VisualBasic/Portable/EditAndContinue/VisualBasicEditAndContinueAnalyzer.vb
浏览文件 @
04b333ce
...
...
@@ -1437,7 +1437,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.EditAndContinue
endToken
=
header
.
DeclarationKeyword
Case
Else
Throw
ExceptionUtilities
.
Un
reachable
Throw
ExceptionUtilities
.
Un
expectedValue
(
header
.
Kind
)
End
Select
End
If
...
...
@@ -1786,7 +1786,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.EditAndContinue
Return
Case
Else
Throw
ExceptionUtilities
.
Un
reachable
Throw
ExceptionUtilities
.
Un
expectedValue
(
_kind
)
End
Select
End
Sub
...
...
@@ -1865,7 +1865,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.EditAndContinue
Return
Case
Else
Throw
ExceptionUtilities
.
Un
reachable
Throw
ExceptionUtilities
.
Un
expectedValue
(
newNode
.
Kind
)
End
Select
End
Sub
...
...
@@ -2167,7 +2167,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.EditAndContinue
Return
Case
Else
Throw
ExceptionUtilities
.
Un
reachable
Throw
ExceptionUtilities
.
Un
expectedValue
(
oldNode
.
Kind
)
End
Select
End
Sub
...
...
@@ -2339,7 +2339,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.EditAndContinue
Return
Case
Else
Throw
ExceptionUtilities
.
Un
reachable
Throw
ExceptionUtilities
.
Un
expectedValue
(
newNode
.
Kind
)
End
Select
End
Sub
...
...
@@ -3093,7 +3093,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.EditAndContinue
Return
DirectCast
(
statement
,
ReturnStatementSyntax
).
Expression
Case
Else
Throw
ExceptionUtilities
.
Un
reachable
Throw
ExceptionUtilities
.
Un
expectedValue
(
statement
.
Kind
())
End
Select
End
Function
...
...
src/VisualStudio/Core/Def/Implementation/EditAndContinue/VsENCRebuildableProjectImpl.cs
浏览文件 @
04b333ce
...
...
@@ -859,7 +859,7 @@ public int GetENCBuildState(ShellInterop.ENC_BUILD_STATE[] pENCBuildState)
break
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
_lastEditSessionSummary
)
;
}
log
.
Write
(
"EnC state of '{0}' queried: {1}{2}"
,
...
...
src/VisualStudio/Core/Def/Implementation/Progression/GraphBuilder.cs
浏览文件 @
04b333ce
...
...
@@ -589,7 +589,7 @@ private static async Task<GraphNode> GetOrCreateNodeForNamedTypeAsync(Graph grap
break
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
namedType
.
TypeKind
)
;
}
node
[
DgmlNodeProperties
.
Icon
]
=
IconHelper
.
GetIconName
(
iconGroupName
,
namedType
.
DeclaredAccessibility
);
...
...
src/VisualStudio/VisualBasic/Impl/ProjectSystemShim/VisualBasicProjectOptionsHelper.vb
浏览文件 @
04b333ce
...
...
@@ -267,7 +267,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.ProjectSystemShim
Return
ReportDiagnostic
.
Error
Case
Else
Throw
ExceptionUtilities
.
Un
reachable
Throw
ExceptionUtilities
.
Un
expectedValue
(
level
)
End
Select
End
Function
...
...
src/Workspaces/CSharp/Portable/Extensions/BaseParameterListSyntaxExtensions.cs
浏览文件 @
04b333ce
...
...
@@ -20,9 +20,9 @@ internal static class BaseParameterListSyntaxExtensions
return
((
BracketedParameterListSyntax
)
parameterList
).
WithParameters
(
parameters
);
case
SyntaxKind
.
ParameterList
:
return
((
ParameterListSyntax
)
parameterList
).
WithParameters
(
parameters
);
default
:
throw
ExceptionUtilities
.
UnexpectedValue
(
parameterList
.
Kind
());
}
throw
ExceptionUtilities
.
Unreachable
;
}
}
}
src/Workspaces/CSharp/Portable/Extensions/TypeDeclarationSyntaxExtensions.cs
浏览文件 @
04b333ce
...
...
@@ -26,9 +26,9 @@ internal static class TypeDeclarationSyntaxExtensions
return
((
InterfaceDeclarationSyntax
)
node
).
AddMembers
(
members
);
case
SyntaxKind
.
StructDeclaration
:
return
((
StructDeclarationSyntax
)
node
).
AddMembers
(
members
);
default
:
throw
ExceptionUtilities
.
UnexpectedValue
(
node
.
Kind
());
}
throw
ExceptionUtilities
.
Unreachable
;
}
public
static
TypeDeclarationSyntax
WithMembers
(
...
...
@@ -42,9 +42,9 @@ internal static class TypeDeclarationSyntaxExtensions
return
((
InterfaceDeclarationSyntax
)
node
).
WithMembers
(
members
);
case
SyntaxKind
.
StructDeclaration
:
return
((
StructDeclarationSyntax
)
node
).
WithMembers
(
members
);
default
:
throw
ExceptionUtilities
.
UnexpectedValue
(
node
.
Kind
());
}
throw
ExceptionUtilities
.
Unreachable
;
}
public
static
TypeDeclarationSyntax
WithAttributeLists
(
...
...
@@ -58,9 +58,9 @@ internal static class TypeDeclarationSyntaxExtensions
return
((
InterfaceDeclarationSyntax
)
node
).
WithAttributeLists
(
attributes
);
case
SyntaxKind
.
StructDeclaration
:
return
((
StructDeclarationSyntax
)
node
).
WithAttributeLists
(
attributes
);
default
:
throw
ExceptionUtilities
.
UnexpectedValue
(
node
.
Kind
());
}
throw
ExceptionUtilities
.
Unreachable
;
}
public
static
TypeDeclarationSyntax
WithIdentifier
(
...
...
@@ -74,9 +74,9 @@ internal static class TypeDeclarationSyntaxExtensions
return
((
InterfaceDeclarationSyntax
)
node
).
WithIdentifier
(
identifier
);
case
SyntaxKind
.
StructDeclaration
:
return
((
StructDeclarationSyntax
)
node
).
WithIdentifier
(
identifier
);
default
:
throw
ExceptionUtilities
.
UnexpectedValue
(
node
.
Kind
());
}
throw
ExceptionUtilities
.
Unreachable
;
}
public
static
TypeDeclarationSyntax
WithModifiers
(
...
...
@@ -90,9 +90,9 @@ internal static class TypeDeclarationSyntaxExtensions
return
((
InterfaceDeclarationSyntax
)
node
).
WithModifiers
(
modifiers
);
case
SyntaxKind
.
StructDeclaration
:
return
((
StructDeclarationSyntax
)
node
).
WithModifiers
(
modifiers
);
default
:
throw
ExceptionUtilities
.
UnexpectedValue
(
node
.
Kind
());
}
throw
ExceptionUtilities
.
Unreachable
;
}
public
static
TypeDeclarationSyntax
WithTypeParameterList
(
...
...
@@ -106,9 +106,9 @@ internal static class TypeDeclarationSyntaxExtensions
return
((
InterfaceDeclarationSyntax
)
node
).
WithTypeParameterList
(
list
);
case
SyntaxKind
.
StructDeclaration
:
return
((
StructDeclarationSyntax
)
node
).
WithTypeParameterList
(
list
);
default
:
throw
ExceptionUtilities
.
UnexpectedValue
(
node
.
Kind
());
}
throw
ExceptionUtilities
.
Unreachable
;
}
public
static
TypeDeclarationSyntax
WithBaseList
(
...
...
@@ -122,9 +122,9 @@ internal static class TypeDeclarationSyntaxExtensions
return
((
InterfaceDeclarationSyntax
)
node
).
WithBaseList
(
list
);
case
SyntaxKind
.
StructDeclaration
:
return
((
StructDeclarationSyntax
)
node
).
WithBaseList
(
list
);
default
:
throw
ExceptionUtilities
.
UnexpectedValue
(
node
.
Kind
());
}
throw
ExceptionUtilities
.
Unreachable
;
}
public
static
TypeDeclarationSyntax
WithConstraintClauses
(
...
...
@@ -138,9 +138,9 @@ internal static class TypeDeclarationSyntaxExtensions
return
((
InterfaceDeclarationSyntax
)
node
).
WithConstraintClauses
(
constraintClauses
);
case
SyntaxKind
.
StructDeclaration
:
return
((
StructDeclarationSyntax
)
node
).
WithConstraintClauses
(
constraintClauses
);
default
:
throw
ExceptionUtilities
.
UnexpectedValue
(
node
.
Kind
());
}
throw
ExceptionUtilities
.
Unreachable
;
}
public
static
TypeDeclarationSyntax
WithOpenBraceToken
(
...
...
@@ -154,9 +154,9 @@ internal static class TypeDeclarationSyntaxExtensions
return
((
InterfaceDeclarationSyntax
)
node
).
WithOpenBraceToken
(
openBrace
);
case
SyntaxKind
.
StructDeclaration
:
return
((
StructDeclarationSyntax
)
node
).
WithOpenBraceToken
(
openBrace
);
default
:
throw
ExceptionUtilities
.
UnexpectedValue
(
node
.
Kind
());
}
throw
ExceptionUtilities
.
Unreachable
;
}
public
static
TypeDeclarationSyntax
WithCloseBraceToken
(
...
...
@@ -170,9 +170,9 @@ internal static class TypeDeclarationSyntaxExtensions
return
((
InterfaceDeclarationSyntax
)
node
).
WithCloseBraceToken
(
closeBrace
);
case
SyntaxKind
.
StructDeclaration
:
return
((
StructDeclarationSyntax
)
node
).
WithCloseBraceToken
(
closeBrace
);
default
:
throw
ExceptionUtilities
.
UnexpectedValue
(
node
.
Kind
());
}
throw
ExceptionUtilities
.
Unreachable
;
}
public
static
IList
<
bool
>
GetInsertionIndices
(
this
TypeDeclarationSyntax
destination
,
CancellationToken
cancellationToken
)
...
...
src/Workspaces/Core/Portable/CodeFixes/FixAllOccurrences/FixAllState.cs
浏览文件 @
04b333ce
...
...
@@ -185,7 +185,7 @@ internal string GetDefaultFixAllTitle()
return
string
.
Format
(
WorkspacesResources
.
Fix_all_0_in_Solution
,
diagnosticId
);
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
this
.
Scope
)
;
}
}
...
...
src/Workspaces/Core/Portable/Formatting/Rules/BaseIndentationFormattingRule.cs
浏览文件 @
04b333ce
...
...
@@ -122,7 +122,7 @@ private IndentBlockOperation CloneAndAdjustFormattingOperation(IndentBlockOperat
case
IndentBlockOption
.
AbsolutePosition
:
return
FormattingOperations
.
CreateIndentBlockOperation
(
operation
.
StartToken
,
operation
.
EndToken
,
AdjustTextSpan
(
operation
.
TextSpan
),
operation
.
IndentationDeltaOrPosition
,
operation
.
Option
);
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
operation
.
Option
)
;
}
}
...
...
src/Workspaces/Core/Portable/Formatting/TriviaEngine/AbstractTriviaFormatter.cs
浏览文件 @
04b333ce
...
...
@@ -404,7 +404,7 @@ private LineColumnRule GetOverallLineColumnRuleBetween(SyntaxTrivia trivia1, Lin
break
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
lineOperation
.
Option
)
;
}
}
...
...
@@ -556,7 +556,7 @@ private bool FirstLineBlank()
return
existingWhitespaceBetween
.
Spaces
;
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
rule
.
IndentationOperation
)
;
}
}
...
...
@@ -570,7 +570,7 @@ private bool FirstLineBlank()
return
Math
.
Max
(
rule
.
Spaces
,
0
);
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
rule
.
SpaceOperation
)
;
}
}
...
...
src/Workspaces/Core/Portable/Shared/Extensions/ISymbolExtensions_Accessibility.cs
浏览文件 @
04b333ce
...
...
@@ -150,7 +150,7 @@ internal static partial class ISymbolExtensions
return
IsMemberAccessible
(
symbol
.
ContainingType
,
symbol
.
DeclaredAccessibility
,
within
,
throughTypeOpt
,
out
failedThroughTypeCheck
);
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
symbol
.
Kind
)
;
}
}
...
...
@@ -221,7 +221,7 @@ private static bool IsNamedTypeAccessible(INamedTypeSymbol type, ISymbol within)
return
withinAssembly
.
IsSameAssemblyOrHasFriendAccessTo
(
assembly
);
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
declaredAccessibility
)
;
}
}
...
...
@@ -307,7 +307,7 @@ private static bool IsNamedTypeAccessible(INamedTypeSymbol type, ISymbol within)
return
IsProtectedSymbolAccessible
(
withinNamedType
,
withinAssembly
,
throughTypeOpt
,
originalContainingType
,
out
failedThroughTypeCheck
);
default
:
throw
ExceptionUtilities
.
Un
reachable
;
throw
ExceptionUtilities
.
Un
expectedValue
(
declaredAccessibility
)
;
}
}
...
...
src/Workspaces/VisualBasic/Portable/CodeCleanup/Providers/ReduceTokensCodeCleanupProvider.vb
浏览文件 @
04b333ce
...
...
@@ -278,7 +278,7 @@ Namespace Microsoft.CodeAnalysis.CodeCleanup.Providers
Dim
asLong
=
CType
(
ConvertToULong
(
value
),
Long
)
Return
"&B"
+
Convert
.
ToString
(
asLong
,
2
)
Case
Else
Throw
ExceptionUtilities
.
Un
reachable
Throw
ExceptionUtilities
.
Un
expectedValue
(
base
)
End
Select
End
Function
...
...
@@ -296,7 +296,7 @@ Namespace Microsoft.CodeAnalysis.CodeCleanup.Providers
Case
SyntaxKind
.
IntegerLiteralToken
Return
token
.
CopyAnnotationsTo
(
SyntaxFactory
.
IntegerLiteralToken
(
leading
,
newValueString
,
token
.
GetBase
().
Value
,
token
.
GetTypeCharacter
(),
DirectCast
(
newValue
,
ULong
),
trailing
))
Case
Else
Throw
ExceptionUtilities
.
Un
reachable
Throw
ExceptionUtilities
.
Un
expectedValue
(
token
.
Kind
)
End
Select
End
Function
...
...
src/Workspaces/VisualBasic/Portable/CodeGeneration/ExpressionGenerator.StringPiece.vb
浏览文件 @
04b333ce
...
...
@@ -68,9 +68,9 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.CodeGeneration
Return
GenerateStringConstantExpression
(
"vbTab"
)
Case
StringPieceKind
.
VerticalTab
Return
GenerateStringConstantExpression
(
"vbVerticalTab"
)
Case
Else
Throw
ExceptionUtilities
.
UnexpectedValue
(
Me
.
Kind
)
End
Select
Throw
ExceptionUtilities
.
Unreachable
End
Function
Private
Shared
Function
GenerateStringConstantExpression
(
name
As
String
)
As
MemberAccessExpressionSyntax
...
...
src/Workspaces/VisualBasic/Portable/Extensions/MethodBaseSyntaxExtensions.vb
浏览文件 @
04b333ce
...
...
@@ -38,5 +38,4 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Extensions
Throw
ExceptionUtilities
.
Unreachable
End
Function
End
Module
End
Namespace
End
Namespace
\ No newline at end of file
src/Workspaces/VisualBasic/Portable/Extensions/TypeBlockSyntaxExtensions.vb
浏览文件 @
04b333ce
...
...
@@ -18,9 +18,9 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Extensions
Return
DirectCast
(
node
,
StructureBlockSyntax
).
WithInherits
(
list
)
Case
SyntaxKind
.
ClassBlock
Return
DirectCast
(
node
,
ClassBlockSyntax
).
WithInherits
(
list
)
Case
Else
Throw
ExceptionUtilities
.
UnexpectedValue
(
node
.
Kind
)
End
Select
Throw
ExceptionUtilities
.
Unreachable
End
Function
<
Extension
>
...
...
@@ -34,9 +34,9 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Extensions
Return
DirectCast
(
node
,
StructureBlockSyntax
).
WithImplements
(
list
)
Case
SyntaxKind
.
ClassBlock
Return
DirectCast
(
node
,
ClassBlockSyntax
).
WithImplements
(
list
)
Case
Else
Throw
ExceptionUtilities
.
UnexpectedValue
(
node
.
Kind
)
End
Select
Throw
ExceptionUtilities
.
Unreachable
End
Function
<
Extension
>
...
...
@@ -50,9 +50,9 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Extensions
Return
DirectCast
(
node
,
StructureBlockSyntax
).
AddMembers
(
members
)
Case
SyntaxKind
.
ClassBlock
Return
DirectCast
(
node
,
ClassBlockSyntax
).
AddMembers
(
members
)
Case
Else
Throw
ExceptionUtilities
.
UnexpectedValue
(
node
.
Kind
)
End
Select
Throw
ExceptionUtilities
.
Unreachable
End
Function
<
Extension
>
...
...
@@ -66,9 +66,9 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Extensions
Return
DirectCast
(
node
,
StructureBlockSyntax
).
WithMembers
(
members
)
Case
SyntaxKind
.
ClassBlock
Return
DirectCast
(
node
,
ClassBlockSyntax
).
WithMembers
(
members
)
Case
Else
Throw
ExceptionUtilities
.
UnexpectedValue
(
node
.
Kind
)
End
Select
Throw
ExceptionUtilities
.
Unreachable
End
Function
<
Extension
>
...
...
@@ -82,9 +82,9 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Extensions
Return
DirectCast
(
node
,
StructureBlockSyntax
).
WithBlockStatement
(
DirectCast
(
[
begin
]
,
StructureStatementSyntax
))
Case
SyntaxKind
.
ClassBlock
Return
DirectCast
(
node
,
ClassBlockSyntax
).
WithBlockStatement
(
DirectCast
(
[
begin
]
,
ClassStatementSyntax
))
Case
Else
Throw
ExceptionUtilities
.
UnexpectedValue
(
node
.
Kind
)
End
Select
Throw
ExceptionUtilities
.
Unreachable
End
Function
<
Extension
>
...
...
@@ -98,9 +98,9 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Extensions
Return
DirectCast
(
node
,
StructureBlockSyntax
).
WithEndBlockStatement
(
[
end
]
)
Case
SyntaxKind
.
ClassBlock
Return
DirectCast
(
node
,
ClassBlockSyntax
).
WithEndBlockStatement
(
[
end
]
)
Case
Else
Throw
ExceptionUtilities
.
UnexpectedValue
(
node
.
Kind
)
End
Select
Throw
ExceptionUtilities
.
Unreachable
End
Function
<
Extension
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录