Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
6856054b
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,发现更多精彩内容 >>
提交
6856054b
编写于
7月 14, 2015
作者:
C
CyrusNajmabadi
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3937 from CyrusNajmabadi/nameof
Use nameof instead of hardcoded argument names.
上级
00d8079b
a1f39425
变更
34
隐藏空白更改
内联
并排
Showing
34 changed file
with
68 addition
and
68 deletion
+68
-68
src/Compilers/CSharp/Portable/CSharpExtensions.cs
src/Compilers/CSharp/Portable/CSharpExtensions.cs
+1
-1
src/EditorFeatures/CSharp/Formatting/Indentation/CSharpIndentationService.Indenter.cs
...rmatting/Indentation/CSharpIndentationService.Indenter.cs
+1
-1
src/EditorFeatures/CSharp/Outlining/CSharpOutliningHelpers.cs
...EditorFeatures/CSharp/Outlining/CSharpOutliningHelpers.cs
+1
-1
src/EditorFeatures/Core/CommandArgs.cs
src/EditorFeatures/Core/CommandArgs.cs
+2
-2
src/EditorFeatures/Core/ExportContentTypeLanguageServiceAttribute.cs
...eatures/Core/ExportContentTypeLanguageServiceAttribute.cs
+1
-1
src/EditorFeatures/Core/Extensibility/BraceMatching/ExportBraceMatcherAttribute.cs
...xtensibility/BraceMatching/ExportBraceMatcherAttribute.cs
+1
-1
src/EditorFeatures/Core/Extensibility/Completion/ExportCompletionProviderAttribute.cs
...nsibility/Completion/ExportCompletionProviderAttribute.cs
+2
-2
src/EditorFeatures/Core/Extensibility/Highlighting/ExportHighlighterAttribute.cs
.../Extensibility/Highlighting/ExportHighlighterAttribute.cs
+1
-1
src/EditorFeatures/Core/Extensibility/QuickInfo/ExportQuickInfoProviderAttribute.cs
...tensibility/QuickInfo/ExportQuickInfoProviderAttribute.cs
+2
-2
src/EditorFeatures/Core/Extensibility/SignatureHelp/ExportSignatureHelpProviderAttribute.cs
...ity/SignatureHelp/ExportSignatureHelpProviderAttribute.cs
+2
-2
src/EditorFeatures/Core/Implementation/Diagnostics/AbstractDiagnosticsTaggerProvider.cs
...entation/Diagnostics/AbstractDiagnosticsTaggerProvider.cs
+1
-1
src/EditorFeatures/Core/Implementation/InlineRename/Dashboard/Dashboard.xaml.cs
...e/Implementation/InlineRename/Dashboard/Dashboard.xaml.cs
+1
-1
src/EditorFeatures/Core/Implementation/LineSeparators/LineSeparatorAdornmentManagerProvider.cs
...n/LineSeparators/LineSeparatorAdornmentManagerProvider.cs
+1
-1
src/EditorFeatures/Core/Implementation/MetadataAsSource/MetadataAsSourceFileService.cs
...mentation/MetadataAsSource/MetadataAsSourceFileService.cs
+2
-2
src/EditorFeatures/Core/Implementation/NavigateTo/NavigateToIconFactory.cs
...s/Core/Implementation/NavigateTo/NavigateToIconFactory.cs
+1
-1
src/EditorFeatures/Core/Implementation/NavigateTo/NavigateToItemProviderFactory.cs
...mplementation/NavigateTo/NavigateToItemProviderFactory.cs
+2
-2
src/EditorFeatures/Core/Implementation/ReferenceHighlighting/NagivateToHighlightReferenceCommandHandler.cs
...ighlighting/NagivateToHighlightReferenceCommandHandler.cs
+2
-2
src/EditorFeatures/Core/Implementation/SmartIndent/AbstractIndentationService.AbstractIndenter.cs
...martIndent/AbstractIndentationService.AbstractIndenter.cs
+1
-1
src/EditorFeatures/Core/Implementation/SmartIndent/SmartIndent.cs
...orFeatures/Core/Implementation/SmartIndent/SmartIndent.cs
+1
-1
src/EditorFeatures/Core/Shared/Tagging/TagProviders/AbstractAsynchronousBufferTaggerProvider.cs
.../TagProviders/AbstractAsynchronousBufferTaggerProvider.cs
+1
-1
src/EditorFeatures/Core/Tagging/AsynchronousTaggerProvider.cs
...EditorFeatures/Core/Tagging/AsynchronousTaggerProvider.cs
+1
-1
src/ExpressionEvaluator/Core/Test/ResultProvider/Debugger/Engine/DkmClrValue.cs
...r/Core/Test/ResultProvider/Debugger/Engine/DkmClrValue.cs
+1
-1
src/VisualStudio/CSharp/Impl/CodeModel/CSharpCodeModelService.cs
...ualStudio/CSharp/Impl/CodeModel/CSharpCodeModelService.cs
+2
-2
src/VisualStudio/Core/Def/CodeMarkers/ManagedCodeMarkers.cs
src/VisualStudio/Core/Def/CodeMarkers/ManagedCodeMarkers.cs
+4
-4
src/VisualStudio/Core/Def/Implementation/AbstractEditorFactory.cs
...alStudio/Core/Def/Implementation/AbstractEditorFactory.cs
+1
-1
src/VisualStudio/Core/Def/Implementation/ProjectSystem/VisualStudioWorkspaceImpl.cs
...Implementation/ProjectSystem/VisualStudioWorkspaceImpl.cs
+15
-15
src/VisualStudio/Core/Def/Implementation/ProvideAutomationPropertiesAttribute.cs
...ef/Implementation/ProvideAutomationPropertiesAttribute.cs
+2
-2
src/VisualStudio/Core/Def/Implementation/Utilities/VsHierarchyExtensions.cs
...ore/Def/Implementation/Utilities/VsHierarchyExtensions.cs
+2
-2
src/VisualStudio/Core/Def/Implementation/Venus/AbstractContainedLanguage.cs
...ore/Def/Implementation/Venus/AbstractContainedLanguage.cs
+3
-3
src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioAddMetadataReferenceCodeActionOperationFactoryWorkspaceService.cs
...ataReferenceCodeActionOperationFactoryWorkspaceService.cs
+2
-2
src/VisualStudio/Core/Def/Progression/GraphNodeCreation.cs
src/VisualStudio/Core/Def/Progression/GraphNodeCreation.cs
+5
-5
src/VisualStudio/Core/Impl/CodeModel/AbstractCodeModelService.cs
...ualStudio/Core/Impl/CodeModel/AbstractCodeModelService.cs
+1
-1
src/VisualStudio/Core/Impl/CodeModel/SyntaxNodeKey.cs
src/VisualStudio/Core/Impl/CodeModel/SyntaxNodeKey.cs
+1
-1
src/VisualStudio/Core/Impl/RoslynVisualStudioWorkspace.cs
src/VisualStudio/Core/Impl/RoslynVisualStudioWorkspace.cs
+1
-1
未找到文件。
src/Compilers/CSharp/Portable/CSharpExtensions.cs
浏览文件 @
6856054b
...
...
@@ -215,7 +215,7 @@ public static SyntaxTokenList Insert(this SyntaxTokenList list, int index, param
if
(
items
==
null
)
{
throw
new
ArgumentNullException
(
"items"
);
throw
new
ArgumentNullException
(
nameof
(
items
)
);
}
if
(
list
.
Count
==
0
)
...
...
src/EditorFeatures/CSharp/Formatting/Indentation/CSharpIndentationService.Indenter.cs
浏览文件 @
6856054b
...
...
@@ -484,7 +484,7 @@ protected override bool HasPreprocessorCharacter(ITextSnapshotLine currentLine)
{
if
(
currentLine
==
null
)
{
throw
new
ArgumentNullException
(
"currentLine"
);
throw
new
ArgumentNullException
(
nameof
(
currentLine
)
);
}
var
text
=
currentLine
.
GetText
();
...
...
src/EditorFeatures/CSharp/Outlining/CSharpOutliningHelpers.cs
浏览文件 @
6856054b
...
...
@@ -203,7 +203,7 @@ public static void CollectCommentRegions(SyntaxNode node, List<OutliningSpan> sp
{
if
(
node
==
null
)
{
throw
new
ArgumentNullException
(
"node"
);
throw
new
ArgumentNullException
(
nameof
(
node
)
);
}
var
triviaList
=
node
.
GetLeadingTrivia
();
...
...
src/EditorFeatures/Core/CommandArgs.cs
浏览文件 @
6856054b
...
...
@@ -25,12 +25,12 @@ public CommandArgs(ITextView textView, ITextBuffer subjectBuffer)
{
if
(
textView
==
null
)
{
throw
new
ArgumentNullException
(
"textView"
);
throw
new
ArgumentNullException
(
nameof
(
textView
)
);
}
if
(
subjectBuffer
==
null
)
{
throw
new
ArgumentNullException
(
"subjectBuffer"
);
throw
new
ArgumentNullException
(
nameof
(
subjectBuffer
)
);
}
this
.
TextView
=
textView
;
...
...
src/EditorFeatures/Core/ExportContentTypeLanguageServiceAttribute.cs
浏览文件 @
6856054b
...
...
@@ -21,7 +21,7 @@ public ExportContentTypeLanguageServiceAttribute(string defaultContentType, stri
{
if
(
defaultContentType
==
null
)
{
throw
new
ArgumentNullException
(
"defaultContentType"
);
throw
new
ArgumentNullException
(
nameof
(
defaultContentType
)
);
}
this
.
DefaultContentType
=
defaultContentType
;
...
...
src/EditorFeatures/Core/Extensibility/BraceMatching/ExportBraceMatcherAttribute.cs
浏览文件 @
6856054b
...
...
@@ -16,7 +16,7 @@ public ExportBraceMatcherAttribute(string language)
{
if
(
language
==
null
)
{
throw
new
ArgumentNullException
(
"language"
);
throw
new
ArgumentNullException
(
nameof
(
language
)
);
}
this
.
Language
=
language
;
...
...
src/EditorFeatures/Core/Extensibility/Completion/ExportCompletionProviderAttribute.cs
浏览文件 @
6856054b
...
...
@@ -18,12 +18,12 @@ public ExportCompletionProviderAttribute(string name, string language)
{
if
(
name
==
null
)
{
throw
new
ArgumentNullException
(
"name"
);
throw
new
ArgumentNullException
(
nameof
(
name
)
);
}
if
(
language
==
null
)
{
throw
new
ArgumentNullException
(
"language"
);
throw
new
ArgumentNullException
(
nameof
(
language
)
);
}
this
.
Name
=
name
;
...
...
src/EditorFeatures/Core/Extensibility/Highlighting/ExportHighlighterAttribute.cs
浏览文件 @
6856054b
...
...
@@ -18,7 +18,7 @@ public ExportHighlighterAttribute(string language)
{
if
(
language
==
null
)
{
throw
new
ArgumentNullException
(
"language"
);
throw
new
ArgumentNullException
(
nameof
(
language
)
);
}
this
.
Language
=
language
;
...
...
src/EditorFeatures/Core/Extensibility/QuickInfo/ExportQuickInfoProviderAttribute.cs
浏览文件 @
6856054b
...
...
@@ -17,12 +17,12 @@ public ExportQuickInfoProviderAttribute(string name, string language)
{
if
(
name
==
null
)
{
throw
new
ArgumentNullException
(
"name"
);
throw
new
ArgumentNullException
(
nameof
(
name
)
);
}
if
(
language
==
null
)
{
throw
new
ArgumentNullException
(
"language"
);
throw
new
ArgumentNullException
(
nameof
(
language
)
);
}
this
.
Name
=
name
;
...
...
src/EditorFeatures/Core/Extensibility/SignatureHelp/ExportSignatureHelpProviderAttribute.cs
浏览文件 @
6856054b
...
...
@@ -17,12 +17,12 @@ public ExportSignatureHelpProviderAttribute(string name, string language)
{
if
(
name
==
null
)
{
throw
new
ArgumentNullException
(
"name"
);
throw
new
ArgumentNullException
(
nameof
(
name
)
);
}
if
(
language
==
null
)
{
throw
new
ArgumentNullException
(
"language"
);
throw
new
ArgumentNullException
(
nameof
(
language
)
);
}
this
.
Name
=
name
;
...
...
src/EditorFeatures/Core/Implementation/Diagnostics/AbstractDiagnosticsTaggerProvider.cs
浏览文件 @
6856054b
...
...
@@ -29,7 +29,7 @@ internal abstract class AbstractDiagnosticsTaggerProvider<TTag> :
{
if
(
subjectBuffer
==
null
)
{
throw
new
ArgumentNullException
(
"subjectBuffer"
);
throw
new
ArgumentNullException
(
nameof
(
subjectBuffer
)
);
}
return
this
.
GetOrCreateTagger
<
T
>(
null
,
subjectBuffer
);
...
...
src/EditorFeatures/Core/Implementation/InlineRename/Dashboard/Dashboard.xaml.cs
浏览文件 @
6856054b
...
...
@@ -122,7 +122,7 @@ private void ConnectToPresentationSource(PresentationSource presentationSource)
{
if
(
presentationSource
==
null
)
{
throw
new
ArgumentNullException
(
"presentationSource"
);
throw
new
ArgumentNullException
(
nameof
(
presentationSource
)
);
}
_presentationSource
=
presentationSource
;
...
...
src/EditorFeatures/Core/Implementation/LineSeparators/LineSeparatorAdornmentManagerProvider.cs
浏览文件 @
6856054b
...
...
@@ -50,7 +50,7 @@ public void TextViewCreated(IWpfTextView textView)
{
if
(
textView
==
null
)
{
throw
new
ArgumentNullException
(
"textView"
);
throw
new
ArgumentNullException
(
nameof
(
textView
)
);
}
if
(!
textView
.
TextBuffer
.
GetOption
(
EditorComponentOnOffOptions
.
Adornment
))
...
...
src/EditorFeatures/Core/Implementation/MetadataAsSource/MetadataAsSourceFileService.cs
浏览文件 @
6856054b
...
...
@@ -71,12 +71,12 @@ public async Task<MetadataAsSourceFile> GetGeneratedFileAsync(Project project, I
{
if
(
project
==
null
)
{
throw
new
ArgumentNullException
(
"project"
);
throw
new
ArgumentNullException
(
nameof
(
project
)
);
}
if
(
symbol
==
null
)
{
throw
new
ArgumentNullException
(
"symbol"
);
throw
new
ArgumentNullException
(
nameof
(
symbol
)
);
}
if
(
symbol
.
Kind
==
SymbolKind
.
Namespace
)
...
...
src/EditorFeatures/Core/Implementation/NavigateTo/NavigateToIconFactory.cs
浏览文件 @
6856054b
...
...
@@ -28,7 +28,7 @@ private static Icon ConvertBitmapSourceToIcon(BitmapSource bmpSource)
{
if
(
bmpSource
==
null
)
{
throw
new
ArgumentNullException
(
"bmpSource"
);
throw
new
ArgumentNullException
(
nameof
(
bmpSource
)
);
}
// We shall convert this BitmapSource to an icon. Sadly, there's no direct API to do this. The approach
...
...
src/EditorFeatures/Core/Implementation/NavigateTo/NavigateToItemProviderFactory.cs
浏览文件 @
6856054b
...
...
@@ -23,12 +23,12 @@ internal class NavigateToItemProviderFactory : INavigateToItemProviderFactory
{
if
(
glyphService
==
null
)
{
throw
new
ArgumentNullException
(
"glyphService"
);
throw
new
ArgumentNullException
(
nameof
(
glyphService
)
);
}
if
(
asyncListeners
==
null
)
{
throw
new
ArgumentNullException
(
"asyncListeners"
);
throw
new
ArgumentNullException
(
nameof
(
asyncListeners
)
);
}
_glyphService
=
glyphService
;
...
...
src/EditorFeatures/Core/Implementation/ReferenceHighlighting/NagivateToHighlightReferenceCommandHandler.cs
浏览文件 @
6856054b
...
...
@@ -30,12 +30,12 @@ internal partial class NavigateToHighlightReferenceCommandHandler :
{
if
(
outliningManagerService
==
null
)
{
throw
new
ArgumentNullException
(
"outliningManagerService"
);
throw
new
ArgumentNullException
(
nameof
(
outliningManagerService
)
);
}
if
(
tagAggregatorFactory
==
null
)
{
throw
new
ArgumentNullException
(
"tagAggregatorFactory"
);
throw
new
ArgumentNullException
(
nameof
(
tagAggregatorFactory
)
);
}
_outliningManagerService
=
outliningManagerService
;
...
...
src/EditorFeatures/Core/Implementation/SmartIndent/AbstractIndentationService.AbstractIndenter.cs
浏览文件 @
6856054b
...
...
@@ -110,7 +110,7 @@ protected ITextSnapshotLine GetPreviousNonBlankOrPreprocessorLine()
{
if
(
Tree
==
null
)
{
throw
new
ArgumentNullException
(
"syntaxTree"
);
throw
new
ArgumentNullException
(
nameof
(
Tree
)
);
}
var
line
=
this
.
LineToBeIndented
;
...
...
src/EditorFeatures/Core/Implementation/SmartIndent/SmartIndent.cs
浏览文件 @
6856054b
...
...
@@ -22,7 +22,7 @@ public SmartIndent(ITextView textView)
{
if
(
textView
==
null
)
{
throw
new
ArgumentNullException
(
"textView"
);
throw
new
ArgumentNullException
(
nameof
(
textView
)
);
}
_textView
=
textView
;
...
...
src/EditorFeatures/Core/Shared/Tagging/TagProviders/AbstractAsynchronousBufferTaggerProvider.cs
浏览文件 @
6856054b
...
...
@@ -25,7 +25,7 @@ internal abstract class AbstractAsynchronousBufferTaggerProvider<TTag> :
{
if
(
subjectBuffer
==
null
)
{
throw
new
ArgumentNullException
(
"subjectBuffer"
);
throw
new
ArgumentNullException
(
nameof
(
subjectBuffer
)
);
}
return
this
.
GetOrCreateTagger
<
T
>(
null
,
subjectBuffer
);
...
...
src/EditorFeatures/Core/Tagging/AsynchronousTaggerProvider.cs
浏览文件 @
6856054b
...
...
@@ -42,7 +42,7 @@ public AsynchronousTaggerProvider(IAsynchronousTaggerDataSource<TTag> dataSource
{
if
(
dataSource
==
null
)
{
throw
new
ArgumentNullException
(
"dataSource"
);
throw
new
ArgumentNullException
(
nameof
(
dataSource
)
);
}
_taggerImplementation
=
new
AsynchronousTaggerProviderImpl
(
asyncListener
,
notificationService
,
dataSource
);
...
...
src/ExpressionEvaluator/Core/Test/ResultProvider/Debugger/Engine/DkmClrValue.cs
浏览文件 @
6856054b
...
...
@@ -626,7 +626,7 @@ public DkmClrValue InstantiateDynamicViewProxy(DkmInspectionContext inspectionCo
{
if
(
inspectionContext
==
null
)
{
throw
new
ArgumentNullException
(
"inspectionContext"
);
throw
new
ArgumentNullException
(
nameof
(
inspectionContext
)
);
}
var
module
=
new
DkmClrModuleInstance
(
...
...
src/VisualStudio/CSharp/Impl/CodeModel/CSharpCodeModelService.cs
浏览文件 @
6856054b
...
...
@@ -787,7 +787,7 @@ public override string GetName(SyntaxNode node)
{
if
(
node
==
null
)
{
throw
new
ArgumentNullException
(
"node"
);
throw
new
ArgumentNullException
(
nameof
(
node
)
);
}
switch
(
node
.
Kind
())
...
...
@@ -861,7 +861,7 @@ public override SyntaxNode SetName(SyntaxNode node, string name)
{
if
(
node
==
null
)
{
throw
new
ArgumentNullException
(
"node"
);
throw
new
ArgumentNullException
(
nameof
(
node
)
);
}
SyntaxToken
newIdentifier
=
SyntaxFactory
.
Identifier
(
name
);
...
...
src/VisualStudio/Core/Def/CodeMarkers/ManagedCodeMarkers.cs
浏览文件 @
6856054b
...
...
@@ -205,7 +205,7 @@ public bool CodeMarkerEx(int nTimerID, byte[] aBuff)
// Check the arguments only after checking whether code markers are enabled
// This allows the calling code to pass null value and avoid calculation of data if nothing is to be logged
if
(
aBuff
==
null
)
throw
new
ArgumentNullException
(
"aBuff"
);
throw
new
ArgumentNullException
(
nameof
(
aBuff
)
);
try
{
...
...
@@ -270,7 +270,7 @@ public bool CodeMarkerEx(int nTimerID, string stringData)
// Check the arguments only after checking whether code markers are enabled
// This allows the calling code to pass null value and avoid calculation of data if nothing is to be logged
if
(
stringData
==
null
)
throw
new
ArgumentNullException
(
"stringData"
);
throw
new
ArgumentNullException
(
nameof
(
stringData
)
);
try
{
...
...
@@ -346,7 +346,7 @@ private static bool UsePrivateCodeMarkers(string regRoot, RegistryView registryV
{
if
(
regRoot
==
null
)
{
throw
new
ArgumentNullException
(
"regRoot"
);
throw
new
ArgumentNullException
(
nameof
(
regRoot
)
);
}
// Reads the Performance subkey from the given registry key
...
...
@@ -410,7 +410,7 @@ public bool InitPerformanceDll(int iApp, string strRegRoot, RegistryView registr
if
(
strRegRoot
==
null
)
{
throw
new
ArgumentNullException
(
"strRegRoot"
);
throw
new
ArgumentNullException
(
nameof
(
strRegRoot
)
);
}
this
.
regroot
=
strRegRoot
;
...
...
src/VisualStudio/Core/Def/Implementation/AbstractEditorFactory.cs
浏览文件 @
6856054b
...
...
@@ -36,7 +36,7 @@ protected AbstractEditorFactory(Package package)
{
if
(
package
==
null
)
{
throw
new
ArgumentNullException
(
"package"
);
throw
new
ArgumentNullException
(
nameof
(
package
)
);
}
_package
=
package
;
...
...
src/VisualStudio/Core/Def/Implementation/ProjectSystem/VisualStudioWorkspaceImpl.cs
浏览文件 @
6856054b
...
...
@@ -247,12 +247,12 @@ protected override void ApplyAnalyzerReferenceAdded(ProjectId projectId, Analyze
{
if
(
projectId
==
null
)
{
throw
new
ArgumentNullException
(
"projectId"
);
throw
new
ArgumentNullException
(
nameof
(
projectId
)
);
}
if
(
analyzerReference
==
null
)
{
throw
new
ArgumentNullException
(
"analyzerReference"
);
throw
new
ArgumentNullException
(
nameof
(
analyzerReference
)
);
}
IVisualStudioHostProject
hostProject
;
...
...
@@ -272,12 +272,12 @@ protected override void ApplyAnalyzerReferenceRemoved(ProjectId projectId, Analy
{
if
(
projectId
==
null
)
{
throw
new
ArgumentNullException
(
"projectId"
);
throw
new
ArgumentNullException
(
nameof
(
projectId
)
);
}
if
(
analyzerReference
==
null
)
{
throw
new
ArgumentNullException
(
"analyzerReference"
);
throw
new
ArgumentNullException
(
nameof
(
analyzerReference
)
);
}
IVisualStudioHostProject
hostProject
;
...
...
@@ -308,12 +308,12 @@ protected override void ApplyMetadataReferenceAdded(ProjectId projectId, Metadat
{
if
(
projectId
==
null
)
{
throw
new
ArgumentNullException
(
"projectId"
);
throw
new
ArgumentNullException
(
nameof
(
projectId
)
);
}
if
(
metadataReference
==
null
)
{
throw
new
ArgumentNullException
(
"metadataReference"
);
throw
new
ArgumentNullException
(
nameof
(
metadataReference
)
);
}
IVisualStudioHostProject
hostProject
;
...
...
@@ -333,12 +333,12 @@ protected override void ApplyMetadataReferenceRemoved(ProjectId projectId, Metad
{
if
(
projectId
==
null
)
{
throw
new
ArgumentNullException
(
"projectId"
);
throw
new
ArgumentNullException
(
nameof
(
projectId
)
);
}
if
(
metadataReference
==
null
)
{
throw
new
ArgumentNullException
(
"metadataReference"
);
throw
new
ArgumentNullException
(
nameof
(
metadataReference
)
);
}
IVisualStudioHostProject
hostProject
;
...
...
@@ -362,12 +362,12 @@ protected override void ApplyProjectReferenceAdded(ProjectId projectId, ProjectR
{
if
(
projectId
==
null
)
{
throw
new
ArgumentNullException
(
"projectId"
);
throw
new
ArgumentNullException
(
nameof
(
projectId
)
);
}
if
(
projectReference
==
null
)
{
throw
new
ArgumentNullException
(
"projectReference"
);
throw
new
ArgumentNullException
(
nameof
(
projectReference
)
);
}
IVisualStudioHostProject
hostProject
;
...
...
@@ -388,12 +388,12 @@ protected override void ApplyProjectReferenceRemoved(ProjectId projectId, Projec
{
if
(
projectId
==
null
)
{
throw
new
ArgumentNullException
(
"projectId"
);
throw
new
ArgumentNullException
(
nameof
(
projectId
)
);
}
if
(
projectReference
==
null
)
{
throw
new
ArgumentNullException
(
"projectReference"
);
throw
new
ArgumentNullException
(
nameof
(
projectReference
)
);
}
IVisualStudioHostProject
hostProject
;
...
...
@@ -594,7 +594,7 @@ protected void RemoveDocumentCore(DocumentId documentId)
{
if
(
documentId
==
null
)
{
throw
new
ArgumentNullException
(
"documentId"
);
throw
new
ArgumentNullException
(
nameof
(
documentId
)
);
}
var
document
=
this
.
GetHostDocument
(
documentId
);
...
...
@@ -669,7 +669,7 @@ public void OpenDocumentCore(DocumentId documentId, bool activate = true)
{
if
(
documentId
==
null
)
{
throw
new
ArgumentNullException
(
"documentId"
);
throw
new
ArgumentNullException
(
nameof
(
documentId
)
);
}
var
document
=
this
.
GetHostDocument
(
documentId
);
...
...
@@ -736,7 +736,7 @@ public void CloseDocumentCore(DocumentId documentId)
{
if
(
documentId
==
null
)
{
throw
new
ArgumentNullException
(
"documentId"
);
throw
new
ArgumentNullException
(
nameof
(
documentId
)
);
}
if
(
this
.
IsDocumentOpen
(
documentId
))
...
...
src/VisualStudio/Core/Def/Implementation/ProvideAutomationPropertiesAttribute.cs
浏览文件 @
6856054b
...
...
@@ -23,12 +23,12 @@ public ProvideAutomationPropertiesAttribute(string category, string page, string
{
if
(
category
==
null
)
{
throw
new
ArgumentNullException
(
"category"
);
throw
new
ArgumentNullException
(
nameof
(
category
)
);
}
if
(
page
==
null
)
{
throw
new
ArgumentNullException
(
"page"
);
throw
new
ArgumentNullException
(
nameof
(
page
)
);
}
this
.
PackageGuid
=
Guid
.
Parse
(
packageGuid
);
...
...
src/VisualStudio/Core/Def/Implementation/Utilities/VsHierarchyExtensions.cs
浏览文件 @
6856054b
...
...
@@ -12,12 +12,12 @@ public static string GetMonikerForHierarchyAndItemId(this IVsRunningDocumentTabl
{
if
(
runningDocTable
==
null
)
{
throw
new
ArgumentNullException
(
"runningDocTable"
);
throw
new
ArgumentNullException
(
nameof
(
runningDocTable
)
);
}
if
(
hierarchy
==
null
)
{
throw
new
ArgumentNullException
(
"hierarchy"
);
throw
new
ArgumentNullException
(
nameof
(
hierarchy
)
);
}
// First, get the doc cookie for this
...
...
src/VisualStudio/Core/Def/Implementation/Venus/AbstractContainedLanguage.cs
浏览文件 @
6856054b
...
...
@@ -43,7 +43,7 @@ internal abstract class AbstractContainedLanguage : IDisposable
{
if
(
project
==
null
)
{
throw
new
ArgumentNullException
(
"project"
);
throw
new
ArgumentNullException
(
nameof
(
project
)
);
}
this
.
Project
=
project
;
...
...
@@ -57,7 +57,7 @@ protected void SetSubjectBuffer(ITextBuffer subjectBuffer)
{
if
(
subjectBuffer
==
null
)
{
throw
new
ArgumentNullException
(
"subjectBuffer"
);
throw
new
ArgumentNullException
(
nameof
(
subjectBuffer
)
);
}
this
.
SubjectBuffer
=
subjectBuffer
;
...
...
@@ -70,7 +70,7 @@ protected void SetDataBuffer(ITextBuffer dataBuffer)
{
if
(
dataBuffer
==
null
)
{
throw
new
ArgumentNullException
(
"dataBuffer"
);
throw
new
ArgumentNullException
(
nameof
(
dataBuffer
)
);
}
this
.
DataBuffer
=
dataBuffer
;
...
...
src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioAddMetadataReferenceCodeActionOperationFactoryWorkspaceService.cs
浏览文件 @
6856054b
...
...
@@ -21,12 +21,12 @@ public CodeActionOperation CreateAddMetadataReferenceOperation(ProjectId project
{
if
(
projectId
==
null
)
{
throw
new
ArgumentNullException
(
"projectId"
);
throw
new
ArgumentNullException
(
nameof
(
projectId
)
);
}
if
(
assemblyIdentity
==
null
)
{
throw
new
ArgumentNullException
(
"assemblyIdentity"
);
throw
new
ArgumentNullException
(
nameof
(
assemblyIdentity
)
);
}
return
new
AddMetadataReferenceOperation
(
projectId
,
assemblyIdentity
);
...
...
src/VisualStudio/Core/Def/Progression/GraphNodeCreation.cs
浏览文件 @
6856054b
...
...
@@ -18,12 +18,12 @@ public static async Task<GraphNodeId> CreateNodeIdAsync(ISymbol symbol, Solution
{
if
(
symbol
==
null
)
{
throw
new
ArgumentNullException
(
"symbol"
);
throw
new
ArgumentNullException
(
nameof
(
symbol
)
);
}
if
(
solution
==
null
)
{
throw
new
ArgumentNullException
(
"solution"
);
throw
new
ArgumentNullException
(
nameof
(
solution
)
);
}
switch
(
symbol
.
Kind
)
...
...
@@ -59,17 +59,17 @@ public static async Task<GraphNode> CreateNodeAsync(this Graph graph, ISymbol sy
{
if
(
graph
==
null
)
{
throw
new
ArgumentNullException
(
"graph"
);
throw
new
ArgumentNullException
(
nameof
(
graph
)
);
}
if
(
symbol
==
null
)
{
throw
new
ArgumentNullException
(
"symbol"
);
throw
new
ArgumentNullException
(
nameof
(
symbol
)
);
}
if
(
solution
==
null
)
{
throw
new
ArgumentNullException
(
"solution"
);
throw
new
ArgumentNullException
(
nameof
(
solution
)
);
}
return
await
GraphBuilder
.
GetOrCreateNodeAsync
(
graph
,
symbol
,
solution
,
cancellationToken
).
ConfigureAwait
(
false
);
...
...
src/VisualStudio/Core/Impl/CodeModel/AbstractCodeModelService.cs
浏览文件 @
6856054b
...
...
@@ -86,7 +86,7 @@ protected int GetTabSize(ITextSnapshot snapshot)
{
if
(
snapshot
==
null
)
{
throw
new
ArgumentNullException
(
"snapshot"
);
throw
new
ArgumentNullException
(
nameof
(
snapshot
)
);
}
var
textBuffer
=
snapshot
.
TextBuffer
;
...
...
src/VisualStudio/Core/Impl/CodeModel/SyntaxNodeKey.cs
浏览文件 @
6856054b
...
...
@@ -21,7 +21,7 @@ public SyntaxNodeKey(string name, int ordinal)
{
if
(
name
==
null
)
{
throw
new
ArgumentNullException
(
"name"
);
throw
new
ArgumentNullException
(
nameof
(
name
)
);
}
if
(
ordinal
<
-
1
)
...
...
src/VisualStudio/Core/Impl/RoslynVisualStudioWorkspace.cs
浏览文件 @
6856054b
...
...
@@ -50,7 +50,7 @@ public override EnvDTE.FileCodeModel GetFileCodeModel(DocumentId documentId)
{
if
(
documentId
==
null
)
{
throw
new
ArgumentNullException
(
"documentId"
);
throw
new
ArgumentNullException
(
nameof
(
documentId
)
);
}
var
project
=
ProjectTracker
.
GetProject
(
documentId
.
ProjectId
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录