Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
5ce992ef
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,发现更多精彩内容 >>
提交
5ce992ef
编写于
3月 28, 2020
作者:
C
Cyrus Najmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use expression-bodies for very simple members (VS project).
上级
a0f0e394
变更
37
隐藏空白更改
内联
并排
Showing
37 changed file
with
101 addition
and
303 deletion
+101
-303
src/VisualStudio/CSharp/Impl/CSharpPackage.cs
src/VisualStudio/CSharp/Impl/CSharpPackage.cs
+2
-6
src/VisualStudio/CSharp/Impl/CodeModel/CSharpCodeModelService.CodeModelEventCollector.cs
...deModel/CSharpCodeModelService.CodeModelEventCollector.cs
+4
-12
src/VisualStudio/CSharp/Impl/CodeModel/CSharpCodeModelService.NodeLocator.cs
...harp/Impl/CodeModel/CSharpCodeModelService.NodeLocator.cs
+1
-3
src/VisualStudio/CSharp/Impl/CodeModel/CSharpCodeModelService.NodeNameGenerator.cs
...mpl/CodeModel/CSharpCodeModelService.NodeNameGenerator.cs
+2
-6
src/VisualStudio/CSharp/Impl/CodeModel/CSharpCodeModelService.cs
...ualStudio/CSharp/Impl/CodeModel/CSharpCodeModelService.cs
+18
-54
src/VisualStudio/CSharp/Impl/CodeModel/CSharpCodeModelServiceFactory.cs
...io/CSharp/Impl/CodeModel/CSharpCodeModelServiceFactory.cs
+1
-3
src/VisualStudio/CSharp/Impl/CodeModel/Extenders/AutoImplementedPropertyExtender.cs
...pl/CodeModel/Extenders/AutoImplementedPropertyExtender.cs
+1
-3
src/VisualStudio/CSharp/Impl/CodeModel/Extenders/CodeTypeLocationExtender.cs
...harp/Impl/CodeModel/Extenders/CodeTypeLocationExtender.cs
+1
-3
src/VisualStudio/CSharp/Impl/CodeModel/Extenders/ExtensionMethodExtender.cs
...Sharp/Impl/CodeModel/Extenders/ExtensionMethodExtender.cs
+1
-3
src/VisualStudio/CSharp/Impl/EventHookup/EventHookupSessionManager.cs
...udio/CSharp/Impl/EventHookup/EventHookupSessionManager.cs
+1
-3
src/VisualStudio/CSharp/Impl/Interactive/CSharpInteractiveCommandHandler.cs
...Sharp/Impl/Interactive/CSharpInteractiveCommandHandler.cs
+1
-3
src/VisualStudio/CSharp/Impl/Interactive/CSharpVsResetInteractiveCommand.cs
...Sharp/Impl/Interactive/CSharpVsResetInteractiveCommand.cs
+2
-6
src/VisualStudio/CSharp/Impl/LanguageService/CSharpHelpContextService.cs
...o/CSharp/Impl/LanguageService/CSharpHelpContextService.cs
+1
-3
src/VisualStudio/CSharp/Impl/ObjectBrowser/ListItemFactory.cs
...VisualStudio/CSharp/Impl/ObjectBrowser/ListItemFactory.cs
+2
-6
src/VisualStudio/CSharp/Impl/ObjectBrowser/ObjectBrowserLibraryManager.cs
.../CSharp/Impl/ObjectBrowser/ObjectBrowserLibraryManager.cs
+1
-3
src/VisualStudio/CSharp/Impl/Options/AutomationObject.cs
src/VisualStudio/CSharp/Impl/Options/AutomationObject.cs
+6
-18
src/VisualStudio/CSharp/Impl/Options/Formatting/CodeStylePage.cs
...ualStudio/CSharp/Impl/Options/Formatting/CodeStylePage.cs
+1
-3
src/VisualStudio/CSharp/Impl/Options/Formatting/FormattingIndentationOptionPage.cs
...mpl/Options/Formatting/FormattingIndentationOptionPage.cs
+1
-3
src/VisualStudio/CSharp/Impl/Options/Formatting/FormattingNewLinesPage.cs
.../CSharp/Impl/Options/Formatting/FormattingNewLinesPage.cs
+1
-3
src/VisualStudio/CSharp/Impl/Options/Formatting/FormattingSpacingPage.cs
...o/CSharp/Impl/Options/Formatting/FormattingSpacingPage.cs
+1
-3
src/VisualStudio/CSharp/Impl/Options/Formatting/FormattingWrappingPage.cs
.../CSharp/Impl/Options/Formatting/FormattingWrappingPage.cs
+1
-3
src/VisualStudio/CSharp/Impl/Options/IntelliSenseOptionPage.cs
...isualStudio/CSharp/Impl/Options/IntelliSenseOptionPage.cs
+1
-3
src/VisualStudio/CSharp/Impl/Options/IntelliSenseOptionPageControl.xaml.cs
...CSharp/Impl/Options/IntelliSenseOptionPageControl.xaml.cs
+3
-9
src/VisualStudio/CSharp/Impl/Progression/CSharpProgressionLanguageService.cs
...harp/Impl/Progression/CSharpProgressionLanguageService.cs
+3
-9
src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpEntryPointFinderService.cs
...p/Impl/ProjectSystemShim/CSharpEntryPointFinderService.cs
+1
-3
src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectExistsUIContextProviderLanguageService.cs
...im/CSharpProjectExistsUIContextProviderLanguageService.cs
+1
-3
src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectShim.ICSCompiler.cs
...p/Impl/ProjectSystemShim/CSharpProjectShim.ICSCompiler.cs
+11
-33
src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectShim.ICSCompilerConfig.cs
.../ProjectSystemShim/CSharpProjectShim.ICSCompilerConfig.cs
+4
-12
src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectShim.ICSInputSet.cs
...p/Impl/ProjectSystemShim/CSharpProjectShim.ICSInputSet.cs
+7
-21
src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectShim.ICSharpProjectSite.cs
...ProjectSystemShim/CSharpProjectShim.ICSharpProjectSite.cs
+8
-24
src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectShim.ICSharpVenusProjectSite.cs
...ctSystemShim/CSharpProjectShim.ICSharpVenusProjectSite.cs
+2
-6
src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectShim.IVsEditorFactoryNotify.cs
...ectSystemShim/CSharpProjectShim.IVsEditorFactoryNotify.cs
+3
-9
src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectShim.OptionsProcessor.cs
...l/ProjectSystemShim/CSharpProjectShim.OptionsProcessor.cs
+3
-9
src/VisualStudio/CSharp/Impl/ProjectSystemShim/EntryPointFinder.cs
...lStudio/CSharp/Impl/ProjectSystemShim/EntryPointFinder.cs
+1
-3
src/VisualStudio/CSharp/Impl/ProjectSystemShim/TempPECompilerService.cs
...io/CSharp/Impl/ProjectSystemShim/TempPECompilerService.cs
+1
-3
src/VisualStudio/CSharp/Impl/Snippets/CSharpSnippetInfoService.cs
...alStudio/CSharp/Impl/Snippets/CSharpSnippetInfoService.cs
+1
-3
src/VisualStudio/CSharp/Impl/Venus/CSharpAdditionalFormattingRuleLanguageService.cs
...pl/Venus/CSharpAdditionalFormattingRuleLanguageService.cs
+1
-3
未找到文件。
src/VisualStudio/CSharp/Impl/CSharpPackage.cs
浏览文件 @
5ce992ef
...
...
@@ -94,9 +94,7 @@ protected override async Task InitializeAsync(CancellationToken cancellationToke
}
protected
override
VisualStudioWorkspaceImpl
CreateWorkspace
()
{
return
this
.
ComponentModel
.
GetService
<
VisualStudioWorkspaceImpl
>();
}
=>
this
.
ComponentModel
.
GetService
<
VisualStudioWorkspaceImpl
>();
protected
override
async
Task
RegisterObjectBrowserLibraryManagerAsync
(
CancellationToken
cancellationToken
)
{
...
...
@@ -158,9 +156,7 @@ protected override IEnumerable<IVsEditorFactory> CreateEditorFactories()
}
protected
override
CSharpLanguageService
CreateLanguageService
()
{
return
new
CSharpLanguageService
(
this
);
}
=>
new
CSharpLanguageService
(
this
);
protected
override
void
RegisterMiscellaneousFilesWorkspaceInformation
(
MiscellaneousFilesWorkspace
miscellaneousFilesWorkspace
)
{
...
...
src/VisualStudio/CSharp/Impl/CodeModel/CSharpCodeModelService.CodeModelEventCollector.cs
浏览文件 @
5ce992ef
...
...
@@ -19,9 +19,7 @@ namespace Microsoft.VisualStudio.LanguageServices.CSharp.CodeModel
internal
partial
class
CSharpCodeModelService
{
protected
override
AbstractCodeModelEventCollector
CreateCodeModelEventCollector
()
{
return
new
CodeModelEventCollector
(
this
);
}
=>
new
CodeModelEventCollector
(
this
);
private
class
CodeModelEventCollector
:
AbstractCodeModelEventCollector
{
...
...
@@ -709,14 +707,10 @@ private bool CompareBaseLists(BaseTypeDeclarationSyntax oldType, BaseTypeDeclara
}
private
bool
CompareModifiers
(
MemberDeclarationSyntax
oldMember
,
MemberDeclarationSyntax
newMember
)
{
return
oldMember
.
GetModifierFlags
()
==
newMember
.
GetModifierFlags
();
}
=>
oldMember
.
GetModifierFlags
()
==
newMember
.
GetModifierFlags
();
private
bool
CompareModifiers
(
ParameterSyntax
oldParameter
,
ParameterSyntax
newParameter
)
{
return
oldParameter
.
GetParameterFlags
()
==
newParameter
.
GetParameterFlags
();
}
=>
oldParameter
.
GetParameterFlags
()
==
newParameter
.
GetParameterFlags
();
private
bool
CompareNames
(
NameSyntax
oldName
,
NameSyntax
newName
)
{
...
...
@@ -847,9 +841,7 @@ private TypeSyntax GetReturnType(BaseMethodDeclarationSyntax method)
}
protected
override
void
CollectCore
(
SyntaxNode
oldRoot
,
SyntaxNode
newRoot
,
CodeModelEventQueue
eventQueue
)
{
CompareCompilationUnits
((
CompilationUnitSyntax
)
oldRoot
,
(
CompilationUnitSyntax
)
newRoot
,
eventQueue
);
}
=>
CompareCompilationUnits
((
CompilationUnitSyntax
)
oldRoot
,
(
CompilationUnitSyntax
)
newRoot
,
eventQueue
);
protected
override
void
EnqueueAddEvent
(
SyntaxNode
node
,
SyntaxNode
parent
,
CodeModelEventQueue
eventQueue
)
{
...
...
src/VisualStudio/CSharp/Impl/CodeModel/CSharpCodeModelService.NodeLocator.cs
浏览文件 @
5ce992ef
...
...
@@ -20,9 +20,7 @@ namespace Microsoft.VisualStudio.LanguageServices.CSharp.CodeModel
internal
partial
class
CSharpCodeModelService
{
protected
override
AbstractNodeLocator
CreateNodeLocator
()
{
return
new
NodeLocator
();
}
=>
new
NodeLocator
();
private
class
NodeLocator
:
AbstractNodeLocator
{
...
...
src/VisualStudio/CSharp/Impl/CodeModel/CSharpCodeModelService.NodeNameGenerator.cs
浏览文件 @
5ce992ef
...
...
@@ -15,16 +15,12 @@ namespace Microsoft.VisualStudio.LanguageServices.CSharp.CodeModel
internal
partial
class
CSharpCodeModelService
{
protected
override
AbstractNodeNameGenerator
CreateNodeNameGenerator
()
{
return
new
NodeNameGenerator
();
}
=>
new
NodeNameGenerator
();
private
class
NodeNameGenerator
:
AbstractNodeNameGenerator
{
protected
override
bool
IsNameableNode
(
SyntaxNode
node
)
{
return
CSharpCodeModelService
.
IsNameableNode
(
node
);
}
=>
CSharpCodeModelService
.
IsNameableNode
(
node
);
private
static
void
AppendName
(
StringBuilder
builder
,
NameSyntax
name
)
{
...
...
src/VisualStudio/CSharp/Impl/CodeModel/CSharpCodeModelService.cs
浏览文件 @
5ce992ef
...
...
@@ -415,9 +415,7 @@ private static IEnumerable<MemberDeclarationSyntax> GetChildMemberNodes(SyntaxNo
}
private
static
bool
NodeIsSupported
(
bool
test
,
SyntaxNode
node
)
{
return
!
test
||
IsNameableNode
(
node
);
}
=>
!
test
||
IsNameableNode
(
node
);
/// <summary>
/// Retrieves the members of a specified <paramref name="container"/> node. The members that are
...
...
@@ -625,9 +623,7 @@ public override EnvDTE.CodeElement CreateUnknownCodeElement(CodeModelState state
}
public
override
EnvDTE
.
CodeElement
CreateUnknownRootNamespaceCodeElement
(
CodeModelState
state
,
FileCodeModel
fileCodeModel
)
{
return
(
EnvDTE
.
CodeElement
)
CodeNamespace
.
CreateUnknown
(
state
,
fileCodeModel
,
(
int
)
SyntaxKind
.
NamespaceDeclaration
,
string
.
Empty
);
}
=>
(
EnvDTE
.
CodeElement
)
CodeNamespace
.
CreateUnknown
(
state
,
fileCodeModel
,
(
int
)
SyntaxKind
.
NamespaceDeclaration
,
string
.
Empty
);
public
override
EnvDTE
.
CodeTypeRef
CreateCodeTypeRef
(
CodeModelState
state
,
ProjectId
projectId
,
object
type
)
{
...
...
@@ -753,29 +749,19 @@ public override EnvDTE.vsCMTypeRef GetTypeKindForCodeTypeRef(ITypeSymbol typeSym
}
public
override
string
GetAsFullNameForCodeTypeRef
(
ITypeSymbol
typeSymbol
)
{
return
typeSymbol
.
ToDisplayString
(
s_codeTypeRefAsFullNameFormat
);
}
=>
typeSymbol
.
ToDisplayString
(
s_codeTypeRefAsFullNameFormat
);
public
override
string
GetAsStringForCodeTypeRef
(
ITypeSymbol
typeSymbol
)
{
return
typeSymbol
.
ToDisplayString
(
s_codeTypeRefAsStringFormat
);
}
=>
typeSymbol
.
ToDisplayString
(
s_codeTypeRefAsStringFormat
);
public
override
bool
IsParameterNode
(
SyntaxNode
node
)
{
return
node
is
ParameterSyntax
;
}
=>
node
is
ParameterSyntax
;
public
override
bool
IsAttributeNode
(
SyntaxNode
node
)
{
return
node
is
AttributeSyntax
;
}
=>
node
is
AttributeSyntax
;
public
override
bool
IsAttributeArgumentNode
(
SyntaxNode
node
)
{
return
node
is
AttributeArgumentSyntax
;
}
=>
node
is
AttributeArgumentSyntax
;
public
override
bool
IsOptionNode
(
SyntaxNode
node
)
{
...
...
@@ -784,9 +770,7 @@ public override bool IsOptionNode(SyntaxNode node)
}
public
override
bool
IsImportNode
(
SyntaxNode
node
)
{
return
node
is
UsingDirectiveSyntax
;
}
=>
node
is
UsingDirectiveSyntax
;
public
override
string
GetUnescapedName
(
string
name
)
{
...
...
@@ -1098,9 +1082,7 @@ public override SyntaxNode GetNodeWithType(SyntaxNode node)
}
public
override
SyntaxNode
GetNodeWithInitializer
(
SyntaxNode
node
)
{
return
node
;
}
=>
node
;
private
EnvDTE
.
vsCMAccess
GetDefaultAccessibility
(
SyntaxNode
node
)
{
...
...
@@ -1807,9 +1789,7 @@ public override SyntaxNode CreateImportNode(string name, string alias = null)
}
public
override
SyntaxNode
CreateParameterNode
(
string
name
,
string
type
)
{
return
SyntaxFactory
.
Parameter
(
SyntaxFactory
.
Identifier
(
name
)).
WithType
(
SyntaxFactory
.
ParseTypeName
(
type
));
}
=>
SyntaxFactory
.
Parameter
(
SyntaxFactory
.
Identifier
(
name
)).
WithType
(
SyntaxFactory
.
ParseTypeName
(
type
));
public
override
string
GetAttributeArgumentValue
(
SyntaxNode
attributeArgumentNode
)
{
...
...
@@ -2979,9 +2959,7 @@ public override SyntaxNode AddInitExpression(SyntaxNode node, string value)
}
public
override
CodeGenerationDestination
GetDestination
(
SyntaxNode
node
)
{
return
CSharpCodeGenerationHelpers
.
GetDestination
(
node
);
}
=>
CSharpCodeGenerationHelpers
.
GetDestination
(
node
);
protected
override
Accessibility
GetDefaultAccessibility
(
SymbolKind
targetSymbolKind
,
CodeGenerationDestination
destination
)
{
...
...
@@ -3521,9 +3499,7 @@ protected override bool IsCodeModelNode(SyntaxNode node)
}
public
override
bool
IsNamespace
(
SyntaxNode
node
)
{
return
node
.
IsKind
(
SyntaxKind
.
NamespaceDeclaration
);
}
=>
node
.
IsKind
(
SyntaxKind
.
NamespaceDeclaration
);
public
override
bool
IsType
(
SyntaxNode
node
)
{
...
...
@@ -3603,14 +3579,10 @@ private static bool IsExtensionMethod(MethodDeclarationSyntax methodDeclaration)
}
private
static
bool
IsPartialMethod
(
MethodDeclarationSyntax
methodDeclaration
)
{
return
methodDeclaration
.
Modifiers
.
Any
(
SyntaxKind
.
PartialKeyword
);
}
=>
methodDeclaration
.
Modifiers
.
Any
(
SyntaxKind
.
PartialKeyword
);
public
override
string
[]
GetFunctionExtenderNames
()
{
return
new
[]
{
ExtenderNames
.
ExtensionMethod
,
ExtenderNames
.
PartialMethod
};
}
=>
new
[]
{
ExtenderNames
.
ExtensionMethod
,
ExtenderNames
.
PartialMethod
};
public
override
object
GetFunctionExtender
(
string
name
,
SyntaxNode
node
,
ISymbol
symbol
)
{
...
...
@@ -3650,9 +3622,7 @@ public override object GetFunctionExtender(string name, SyntaxNode node, ISymbol
}
public
override
string
[]
GetPropertyExtenderNames
()
{
return
new
[]
{
ExtenderNames
.
AutoImplementedProperty
};
}
=>
new
[]
{
ExtenderNames
.
AutoImplementedProperty
};
public
override
object
GetPropertyExtender
(
string
name
,
SyntaxNode
node
,
ISymbol
symbol
)
{
...
...
@@ -3674,9 +3644,7 @@ public override object GetPropertyExtender(string name, SyntaxNode node, ISymbol
}
public
override
string
[]
GetExternalTypeExtenderNames
()
{
return
new
[]
{
ExtenderNames
.
ExternalLocation
};
}
=>
new
[]
{
ExtenderNames
.
ExternalLocation
};
public
override
object
GetExternalTypeExtender
(
string
name
,
string
externalLocation
)
{
...
...
@@ -3691,14 +3659,10 @@ public override object GetExternalTypeExtender(string name, string externalLocat
}
public
override
string
[]
GetTypeExtenderNames
()
{
return
Array
.
Empty
<
string
>();
}
=>
Array
.
Empty
<
string
>();
public
override
object
GetTypeExtender
(
string
name
,
AbstractCodeType
symbol
)
{
throw
Exceptions
.
ThrowEFail
();
}
=>
throw
Exceptions
.
ThrowEFail
();
protected
override
bool
AddBlankLineToMethodBody
(
SyntaxNode
node
,
SyntaxNode
newNode
)
{
...
...
src/VisualStudio/CSharp/Impl/CodeModel/CSharpCodeModelServiceFactory.cs
浏览文件 @
5ce992ef
...
...
@@ -31,8 +31,6 @@ internal partial class CSharpCodeModelServiceFactory : ILanguageServiceFactory
}
public
ILanguageService
CreateLanguageService
(
HostLanguageServices
provider
)
{
return
new
CSharpCodeModelService
(
provider
,
_editorOptionsFactoryService
,
_refactorNotifyServices
);
}
=>
new
CSharpCodeModelService
(
provider
,
_editorOptionsFactoryService
,
_refactorNotifyServices
);
}
}
src/VisualStudio/CSharp/Impl/CodeModel/Extenders/AutoImplementedPropertyExtender.cs
浏览文件 @
5ce992ef
...
...
@@ -21,9 +21,7 @@ internal static ICSAutoImplementedPropertyExtender Create(bool isAutoImplemented
private
readonly
bool
_isAutoImplemented
;
private
AutoImplementedPropertyExtender
(
bool
isAutoImplemented
)
{
_isAutoImplemented
=
isAutoImplemented
;
}
=>
_isAutoImplemented
=
isAutoImplemented
;
public
bool
IsAutoImplemented
{
...
...
src/VisualStudio/CSharp/Impl/CodeModel/Extenders/CodeTypeLocationExtender.cs
浏览文件 @
5ce992ef
...
...
@@ -21,9 +21,7 @@ internal static ICSCodeTypeLocation Create(string externalLocation)
private
readonly
string
_externalLocation
;
private
CodeTypeLocationExtender
(
string
externalLocation
)
{
_externalLocation
=
externalLocation
;
}
=>
_externalLocation
=
externalLocation
;
public
string
ExternalLocation
{
...
...
src/VisualStudio/CSharp/Impl/CodeModel/Extenders/ExtensionMethodExtender.cs
浏览文件 @
5ce992ef
...
...
@@ -21,9 +21,7 @@ internal static ICSExtensionMethodExtender Create(bool isExtension)
private
readonly
bool
_isExtension
;
private
ExtensionMethodExtender
(
bool
isExtension
)
{
_isExtension
=
isExtension
;
}
=>
_isExtension
=
isExtension
;
public
bool
IsExtension
{
...
...
src/VisualStudio/CSharp/Impl/EventHookup/EventHookupSessionManager.cs
浏览文件 @
5ce992ef
...
...
@@ -153,8 +153,6 @@ private void Caret_PositionChanged(object sender, EventArgs e)
}
internal
bool
IsTrackingSession
()
{
return
CurrentSession
!=
null
;
}
=>
CurrentSession
!=
null
;
}
}
src/VisualStudio/CSharp/Impl/Interactive/CSharpInteractiveCommandHandler.cs
浏览文件 @
5ce992ef
...
...
@@ -41,8 +41,6 @@ internal sealed class CSharpInteractiveCommandHandler : InteractiveCommandHandle
protected
override
ISendToInteractiveSubmissionProvider
SendToInteractiveSubmissionProvider
=>
_sendToInteractiveSubmissionProvider
;
protected
override
IInteractiveWindow
OpenInteractiveWindow
(
bool
focus
)
{
return
_interactiveWindowProvider
.
Open
(
instanceId
:
0
,
focus
:
focus
).
InteractiveWindow
;
}
=>
_interactiveWindowProvider
.
Open
(
instanceId
:
0
,
focus
:
focus
).
InteractiveWindow
;
}
}
src/VisualStudio/CSharp/Impl/Interactive/CSharpVsResetInteractiveCommand.cs
浏览文件 @
5ce992ef
...
...
@@ -31,13 +31,9 @@ protected override string LanguageName
}
protected
override
string
CreateReference
(
string
referenceName
)
{
return
string
.
Format
(
"#r \"{0}\""
,
referenceName
);
}
=>
string
.
Format
(
"#r \"{0}\""
,
referenceName
);
protected
override
string
CreateImport
(
string
namespaceName
)
{
return
string
.
Format
(
"using {0};"
,
namespaceName
);
}
=>
string
.
Format
(
"using {0};"
,
namespaceName
);
}
}
src/VisualStudio/CSharp/Impl/LanguageService/CSharpHelpContextService.cs
浏览文件 @
5ce992ef
...
...
@@ -47,9 +47,7 @@ public override string Product
}
private
static
string
Keyword
(
string
text
)
{
return
text
+
"_CSharpKeyword"
;
}
=>
text
+
"_CSharpKeyword"
;
public
override
async
Task
<
string
>
GetHelpTermAsync
(
Document
document
,
TextSpan
span
,
CancellationToken
cancellationToken
)
{
...
...
src/VisualStudio/CSharp/Impl/ObjectBrowser/ListItemFactory.cs
浏览文件 @
5ce992ef
...
...
@@ -26,13 +26,9 @@ internal class ListItemFactory : AbstractListItemFactory
miscellaneousOptions
:
SymbolDisplayMiscellaneousOptions
.
UseSpecialTypes
);
protected
override
string
GetMemberDisplayString
(
ISymbol
memberSymbol
)
{
return
memberSymbol
.
ToDisplayString
(
s_memberDisplayFormat
);
}
=>
memberSymbol
.
ToDisplayString
(
s_memberDisplayFormat
);
protected
override
string
GetMemberAndTypeDisplayString
(
ISymbol
memberSymbol
)
{
return
memberSymbol
.
ToDisplayString
(
s_memberWithContainingTypeDisplayFormat
);
}
=>
memberSymbol
.
ToDisplayString
(
s_memberWithContainingTypeDisplayFormat
);
}
}
src/VisualStudio/CSharp/Impl/ObjectBrowser/ObjectBrowserLibraryManager.cs
浏览文件 @
5ce992ef
...
...
@@ -26,8 +26,6 @@ public ObjectBrowserLibraryManager(IServiceProvider serviceProvider, IComponentM
}
internal
override
AbstractListItemFactory
CreateListItemFactory
()
{
return
new
ListItemFactory
();
}
=>
new
ListItemFactory
();
}
}
src/VisualStudio/CSharp/Impl/Options/AutomationObject.cs
浏览文件 @
5ce992ef
...
...
@@ -28,9 +28,7 @@ public class AutomationObject
private
readonly
Workspace
_workspace
;
internal
AutomationObject
(
Workspace
workspace
)
{
_workspace
=
workspace
;
}
=>
_workspace
=
workspace
;
/// <summary>
/// Unused. But kept around for back compat. Note this option is not about
...
...
@@ -762,19 +760,13 @@ public int Wrapping_PreserveSingleLine
}
private
int
GetBooleanOption
(
Option2
<
bool
>
key
)
{
return
_workspace
.
Options
.
GetOption
(
key
)
?
1
:
0
;
}
=>
_workspace
.
Options
.
GetOption
(
key
)
?
1
:
0
;
private
int
GetBooleanOption
(
PerLanguageOption2
<
bool
>
key
)
{
return
_workspace
.
Options
.
GetOption
(
key
,
LanguageNames
.
CSharp
)
?
1
:
0
;
}
=>
_workspace
.
Options
.
GetOption
(
key
,
LanguageNames
.
CSharp
)
?
1
:
0
;
private
T
GetOption
<
T
>(
PerLanguageOption2
<
T
>
key
)
{
return
_workspace
.
Options
.
GetOption
(
key
,
LanguageNames
.
CSharp
);
}
=>
_workspace
.
Options
.
GetOption
(
key
,
LanguageNames
.
CSharp
);
private
void
SetBooleanOption
(
Option2
<
bool
>
key
,
int
value
)
{
...
...
@@ -806,9 +798,7 @@ private int GetBooleanOption(PerLanguageOption2<bool?> key)
}
private
string
GetXmlOption
<
T
>(
Option2
<
CodeStyleOption2
<
T
>>
option
)
{
return
_workspace
.
Options
.
GetOption
(
option
).
ToXElement
().
ToString
();
}
=>
_workspace
.
Options
.
GetOption
(
option
).
ToXElement
().
ToString
();
private
void
SetBooleanOption
(
PerLanguageOption2
<
bool
?>
key
,
int
value
)
{
...
...
@@ -818,9 +808,7 @@ private void SetBooleanOption(PerLanguageOption2<bool?> key, int value)
}
private
string
GetXmlOption
(
PerLanguageOption2
<
CodeStyleOption2
<
bool
>>
option
)
{
return
_workspace
.
Options
.
GetOption
(
option
,
LanguageNames
.
CSharp
).
ToXElement
().
ToString
();
}
=>
_workspace
.
Options
.
GetOption
(
option
,
LanguageNames
.
CSharp
).
ToXElement
().
ToString
();
private
void
SetXmlOption
<
T
>(
Option2
<
CodeStyleOption2
<
T
>>
option
,
string
value
)
{
...
...
src/VisualStudio/CSharp/Impl/Options/Formatting/CodeStylePage.cs
浏览文件 @
5ce992ef
...
...
@@ -40,9 +40,7 @@ private static ImmutableArray<(string feature, ImmutableArray<IOption> options)>
internal
readonly
struct
TestAccessor
{
internal
static
ImmutableArray
<(
string
feature
,
ImmutableArray
<
IOption
>
options
)>
GetEditorConfigOptions
()
{
return
CodeStylePage
.
GetEditorConfigOptions
();
}
=>
CodeStylePage
.
GetEditorConfigOptions
();
}
}
}
src/VisualStudio/CSharp/Impl/Options/Formatting/FormattingIndentationOptionPage.cs
浏览文件 @
5ce992ef
...
...
@@ -12,8 +12,6 @@ namespace Microsoft.VisualStudio.LanguageServices.CSharp.Options.Formatting
internal
class
FormattingIndentationOptionPage
:
AbstractOptionPage
{
protected
override
AbstractOptionPageControl
CreateOptionPage
(
IServiceProvider
serviceProvider
,
OptionStore
optionStore
)
{
return
new
OptionPreviewControl
(
serviceProvider
,
optionStore
,
(
o
,
s
)
=>
new
IndentationViewModel
(
o
,
s
));
}
=>
new
OptionPreviewControl
(
serviceProvider
,
optionStore
,
(
o
,
s
)
=>
new
IndentationViewModel
(
o
,
s
));
}
}
src/VisualStudio/CSharp/Impl/Options/Formatting/FormattingNewLinesPage.cs
浏览文件 @
5ce992ef
...
...
@@ -14,8 +14,6 @@ public FormattingNewLinesPage()
}
protected
override
AbstractOptionPageControl
CreateOptionPage
(
IServiceProvider
serviceProvider
,
OptionStore
optionStore
)
{
return
new
OptionPreviewControl
(
serviceProvider
,
optionStore
,
(
o
,
s
)
=>
new
NewLinesViewModel
(
o
,
s
));
}
=>
new
OptionPreviewControl
(
serviceProvider
,
optionStore
,
(
o
,
s
)
=>
new
NewLinesViewModel
(
o
,
s
));
}
}
src/VisualStudio/CSharp/Impl/Options/Formatting/FormattingSpacingPage.cs
浏览文件 @
5ce992ef
...
...
@@ -12,8 +12,6 @@ namespace Microsoft.VisualStudio.LanguageServices.CSharp.Options.Formatting
internal
class
FormattingSpacingPage
:
AbstractOptionPage
{
protected
override
AbstractOptionPageControl
CreateOptionPage
(
IServiceProvider
serviceProvider
,
OptionStore
optionStore
)
{
return
new
OptionPreviewControl
(
serviceProvider
,
optionStore
,
(
o
,
s
)
=>
new
SpacingViewModel
(
o
,
s
));
}
=>
new
OptionPreviewControl
(
serviceProvider
,
optionStore
,
(
o
,
s
)
=>
new
SpacingViewModel
(
o
,
s
));
}
}
src/VisualStudio/CSharp/Impl/Options/Formatting/FormattingWrappingPage.cs
浏览文件 @
5ce992ef
...
...
@@ -12,8 +12,6 @@ namespace Microsoft.VisualStudio.LanguageServices.CSharp.Options.Formatting
internal
class
FormattingWrappingPage
:
AbstractOptionPage
{
protected
override
AbstractOptionPageControl
CreateOptionPage
(
IServiceProvider
serviceProvider
,
OptionStore
optionStore
)
{
return
new
OptionPreviewControl
(
serviceProvider
,
optionStore
,
(
o
,
s
)
=>
new
WrappingViewModel
(
o
,
s
));
}
=>
new
OptionPreviewControl
(
serviceProvider
,
optionStore
,
(
o
,
s
)
=>
new
WrappingViewModel
(
o
,
s
));
}
}
src/VisualStudio/CSharp/Impl/Options/IntelliSenseOptionPage.cs
浏览文件 @
5ce992ef
...
...
@@ -12,8 +12,6 @@ namespace Microsoft.VisualStudio.LanguageServices.CSharp.Options
internal
class
IntelliSenseOptionPage
:
AbstractOptionPage
{
protected
override
AbstractOptionPageControl
CreateOptionPage
(
IServiceProvider
serviceProvider
,
OptionStore
optionStore
)
{
return
new
IntelliSenseOptionPageControl
(
optionStore
);
}
=>
new
IntelliSenseOptionPageControl
(
optionStore
);
}
}
src/VisualStudio/CSharp/Impl/Options/IntelliSenseOptionPageControl.xaml.cs
浏览文件 @
5ce992ef
...
...
@@ -37,9 +37,7 @@ public IntelliSenseOptionPageControl(OptionStore optionStore) : base(optionStore
}
private
void
Show_completion_list_after_a_character_is_typed_Checked
(
object
sender
,
RoutedEventArgs
e
)
{
Show_completion_list_after_a_character_is_deleted
.
IsEnabled
=
Show_completion_list_after_a_character_is_typed
.
IsChecked
==
true
;
}
=>
Show_completion_list_after_a_character_is_deleted
.
IsEnabled
=
Show_completion_list_after_a_character_is_typed
.
IsChecked
==
true
;
private
void
Show_completion_list_after_a_character_is_typed_Unchecked
(
object
sender
,
RoutedEventArgs
e
)
{
...
...
@@ -49,14 +47,10 @@ private void Show_completion_list_after_a_character_is_typed_Unchecked(object se
}
private
void
Show_completion_list_after_a_character_is_deleted_Checked
(
object
sender
,
RoutedEventArgs
e
)
{
this
.
OptionStore
.
SetOption
(
CompletionOptions
.
TriggerOnDeletion
,
LanguageNames
.
CSharp
,
value
:
true
);
}
=>
this
.
OptionStore
.
SetOption
(
CompletionOptions
.
TriggerOnDeletion
,
LanguageNames
.
CSharp
,
value
:
true
);
private
void
Show_completion_list_after_a_character_is_deleted_Unchecked
(
object
sender
,
RoutedEventArgs
e
)
{
this
.
OptionStore
.
SetOption
(
CompletionOptions
.
TriggerOnDeletion
,
LanguageNames
.
CSharp
,
value
:
false
);
}
=>
this
.
OptionStore
.
SetOption
(
CompletionOptions
.
TriggerOnDeletion
,
LanguageNames
.
CSharp
,
value
:
false
);
private
void
Show_items_from_unimported_namespaces_CheckedChanged
(
object
sender
,
RoutedEventArgs
e
)
{
...
...
src/VisualStudio/CSharp/Impl/Progression/CSharpProgressionLanguageService.cs
浏览文件 @
5ce992ef
...
...
@@ -88,14 +88,10 @@ public IEnumerable<SyntaxNode> GetTopLevelNodesFromDocument(SyntaxNode root, Can
}
public
string
GetDescriptionForSymbol
(
ISymbol
symbol
,
bool
includeContainingSymbol
)
{
return
GetSymbolText
(
symbol
,
includeContainingSymbol
,
s_descriptionFormat
);
}
=>
GetSymbolText
(
symbol
,
includeContainingSymbol
,
s_descriptionFormat
);
public
string
GetLabelForSymbol
(
ISymbol
symbol
,
bool
includeContainingSymbol
)
{
return
GetSymbolText
(
symbol
,
includeContainingSymbol
,
s_labelFormat
);
}
=>
GetSymbolText
(
symbol
,
includeContainingSymbol
,
s_labelFormat
);
private
static
string
GetSymbolText
(
ISymbol
symbol
,
bool
includeContainingSymbol
,
SymbolDisplayFormat
displayFormat
)
{
...
...
@@ -130,8 +126,6 @@ private static ITypeSymbol GetType(ISymbol symbol)
}
private
static
bool
IncludeReturnType
(
IMethodSymbol
f
)
{
return
f
.
MethodKind
==
MethodKind
.
Ordinary
||
f
.
MethodKind
==
MethodKind
.
ExplicitInterfaceImplementation
;
}
=>
f
.
MethodKind
==
MethodKind
.
Ordinary
||
f
.
MethodKind
==
MethodKind
.
ExplicitInterfaceImplementation
;
}
}
src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpEntryPointFinderService.cs
浏览文件 @
5ce992ef
...
...
@@ -21,8 +21,6 @@ public CSharpEntryPointFinderService()
}
public
IEnumerable
<
INamedTypeSymbol
>
FindEntryPoints
(
INamespaceSymbol
symbol
,
bool
findFormsOnly
)
{
return
EntryPointFinder
.
FindEntryPoints
(
symbol
);
}
=>
EntryPointFinder
.
FindEntryPoints
(
symbol
);
}
}
src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectExistsUIContextProviderLanguageService.cs
浏览文件 @
5ce992ef
...
...
@@ -23,8 +23,6 @@ public CSharpProjectExistsUIContextProviderLanguageService()
}
public
UIContext
GetUIContext
()
{
return
UIContext
.
FromUIContextGuid
(
Guids
.
CSharpProjectExistsInWorkspaceUIContext
);
}
=>
UIContext
.
FromUIContextGuid
(
Guids
.
CSharpProjectExistsInWorkspaceUIContext
);
}
}
src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectShim.ICSCompiler.cs
浏览文件 @
5ce992ef
...
...
@@ -10,58 +10,36 @@ namespace Microsoft.VisualStudio.LanguageServices.CSharp.ProjectSystemShim
internal
partial
class
CSharpProjectShim
:
ICSCompiler
{
public
ICSSourceModule
CreateSourceModule
(
ICSSourceText
text
)
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
ICSNameTable
GetNameTable
()
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
void
Shutdown
()
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
ICSCompilerConfig
GetConfiguration
()
{
return
this
;
}
=>
this
;
public
ICSInputSet
AddInputSet
()
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
void
RemoveInputSet
(
ICSInputSet
inputSet
)
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
void
Compile
(
ICSCompileProgress
progress
)
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
void
BuildForEnc
(
ICSCompileProgress
progress
,
ICSEncProjectServices
encService
,
object
pe
)
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
object
CreateParser
()
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
object
CreateLanguageAnalysisEngine
()
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
void
ReleaseReservedMemory
()
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
}
}
src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectShim.ICSCompilerConfig.cs
浏览文件 @
5ce992ef
...
...
@@ -18,14 +18,10 @@ public int GetOptionCount()
}
public
void
GetOptionInfoAt
(
int
index
,
out
CompilerOptions
optionID
,
out
string
switchName
,
out
string
switchDescription
,
out
uint
flags
)
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
void
GetOptionInfoAtEx
(
int
index
,
out
CompilerOptions
optionID
,
out
string
shortSwitchName
,
out
string
longSwitchName
,
out
string
descriptiveSwitchName
,
out
string
switchDescription
,
out
uint
flags
)
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
void
ResetAllOptions
()
{
...
...
@@ -56,9 +52,7 @@ public int SetOption(CompilerOptions optionID, HACK_VariantStructure value)
}
public
void
GetOption
(
CompilerOptions
optionID
,
IntPtr
variant
)
{
Marshal
.
GetNativeVariantForObject
(
VisualStudioProjectOptionsProcessor
[
optionID
],
variant
);
}
=>
Marshal
.
GetNativeVariantForObject
(
VisualStudioProjectOptionsProcessor
[
optionID
],
variant
);
public
int
CommitChanges
(
ref
ICSError
error
)
{
...
...
@@ -79,8 +73,6 @@ public IntPtr GetWarnNumbers(out int count)
}
public
string
GetWarnInfo
(
int
warnIndex
)
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
}
}
src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectShim.ICSInputSet.cs
浏览文件 @
5ce992ef
...
...
@@ -12,9 +12,7 @@ namespace Microsoft.VisualStudio.LanguageServices.CSharp.ProjectSystemShim
internal
partial
class
CSharpProjectShim
:
ICSInputSet
{
public
ICSCompiler
GetCompiler
()
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
void
AddSourceFile
(
string
filename
)
{
...
...
@@ -27,19 +25,13 @@ public void RemoveSourceFile(string filename)
}
public
void
RemoveAllSourceFiles
()
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
void
AddResourceFile
(
string
filename
,
string
ident
,
bool
embed
,
bool
vis
)
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
void
RemoveResourceFile
(
string
filename
,
string
ident
,
bool
embed
,
bool
vis
)
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
void
SetWin32Resource
(
string
filename
)
{
...
...
@@ -63,9 +55,7 @@ public void SetOutputFileName(string filename)
}
public
void
SetOutputFileType
(
OutputFileType
fileType
)
{
VisualStudioProjectOptionsProcessor
.
SetOutputFileType
(
fileType
);
}
=>
VisualStudioProjectOptionsProcessor
.
SetOutputFileType
(
fileType
);
public
void
SetImageBase
(
uint
imageBase
)
{
...
...
@@ -73,9 +63,7 @@ public void SetImageBase(uint imageBase)
}
public
void
SetMainClass
(
string
fullyQualifiedClassName
)
{
VisualStudioProjectOptionsProcessor
.
SetMainTypeName
(
fullyQualifiedClassName
);
}
=>
VisualStudioProjectOptionsProcessor
.
SetMainTypeName
(
fullyQualifiedClassName
);
public
void
SetWin32Icon
(
string
iconFileName
)
{
...
...
@@ -98,9 +86,7 @@ public void SetPdbFileName(string filename)
}
public
string
GetWin32Resource
()
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
void
SetWin32Manifest
(
string
manifestFileName
)
{
...
...
src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectShim.ICSharpProjectSite.cs
浏览文件 @
5ce992ef
...
...
@@ -30,19 +30,13 @@ public void GetCompiler(out ICSCompiler compiler, out ICSInputSet inputSet)
}
public
bool
CheckInputFileTimes
(
System
.
Runtime
.
InteropServices
.
ComTypes
.
FILETIME
output
)
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
void
BuildProject
(
object
progress
)
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
void
Unused
()
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
void
OnSourceFileAdded
(
string
filename
)
{
...
...
@@ -54,19 +48,13 @@ public void OnSourceFileAdded(string filename)
}
public
void
OnSourceFileRemoved
(
string
filename
)
{
RemoveFile
(
filename
);
}
=>
RemoveFile
(
filename
);
public
int
OnResourceFileAdded
(
string
filename
,
string
resourceName
,
bool
embedded
)
{
return
VSConstants
.
S_OK
;
}
=>
VSConstants
.
S_OK
;
public
int
OnResourceFileRemoved
(
string
filename
)
{
return
VSConstants
.
S_OK
;
}
=>
VSConstants
.
S_OK
;
public
int
OnImportAdded
(
string
filename
,
string
project
)
{
...
...
@@ -124,14 +112,10 @@ public int CreateFileCodeModel(string fileName, object parent, out EnvDTE.FileCo
}
public
void
OnModuleAdded
(
string
filename
)
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
void
OnModuleRemoved
(
string
filename
)
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
int
GetValidStartupClasses
(
IntPtr
[]
classNames
,
ref
int
count
)
{
...
...
src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectShim.ICSharpVenusProjectSite.cs
浏览文件 @
5ce992ef
...
...
@@ -13,9 +13,7 @@ namespace Microsoft.VisualStudio.LanguageServices.CSharp.ProjectSystemShim
internal
partial
class
CSharpProjectShim
:
ICSharpVenusProjectSite
{
public
void
AddReferenceToCodeDirectory
(
string
assemblyFileName
,
ICSharpProjectRoot
project
)
{
AddReferenceToCodeDirectoryEx
(
assemblyFileName
,
project
,
CompilerOptions
.
OPTID_IMPORTS
);
}
=>
AddReferenceToCodeDirectoryEx
(
assemblyFileName
,
project
,
CompilerOptions
.
OPTID_IMPORTS
);
public
void
RemoveReferenceToCodeDirectory
(
string
assemblyFileName
,
ICSharpProjectRoot
project
)
{
...
...
@@ -35,9 +33,7 @@ public void RemoveReferenceToCodeDirectory(string assemblyFileName, ICSharpProje
}
public
void
OnDiskFileUpdated
(
string
filename
,
ref
System
.
Runtime
.
InteropServices
.
ComTypes
.
FILETIME
pFT
)
{
throw
new
NotImplementedException
();
}
=>
throw
new
NotImplementedException
();
public
void
OnCodeDirectoryAliasesChanged
(
ICSharpProjectRoot
project
,
int
previousAliasesCount
,
string
[]
previousAliases
,
int
currentAliasesCount
,
string
[]
currentAliases
)
{
...
...
src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectShim.IVsEditorFactoryNotify.cs
浏览文件 @
5ce992ef
...
...
@@ -15,18 +15,12 @@ namespace Microsoft.VisualStudio.LanguageServices.CSharp.ProjectSystemShim
internal
partial
class
CSharpProjectShim
:
IVsEditorFactoryNotify
{
public
int
NotifyDependentItemSaved
(
IVsHierarchy
hier
,
uint
itemidParent
,
string
documentParentMoniker
,
uint
itemidDpendent
,
string
documentDependentMoniker
)
{
throw
new
NotSupportedException
();
}
=>
throw
new
NotSupportedException
();
public
int
NotifyItemAdded
(
uint
grfEFN
,
IVsHierarchy
hier
,
uint
itemid
,
string
documentId
)
{
throw
new
NotSupportedException
();
}
=>
throw
new
NotSupportedException
();
public
int
NotifyItemRenamed
(
IVsHierarchy
hier
,
uint
itemid
,
string
documentOldMoniker
,
string
documentNewMoniker
)
{
throw
new
NotSupportedException
();
}
=>
throw
new
NotSupportedException
();
}
}
src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectShim.OptionsProcessor.cs
浏览文件 @
5ce992ef
...
...
@@ -153,9 +153,7 @@ protected override CompilationOptions ComputeCompilationOptionsWithHostValues(Co
}
private
static
string
GetIdForErrorCode
(
int
errorCode
)
{
return
"CS"
+
errorCode
.
ToString
(
"0000"
);
}
=>
"CS"
+
errorCode
.
ToString
(
"0000"
);
private
IEnumerable
<
string
>
ParseWarningCodes
(
CompilerOptions
compilerOptions
)
{
...
...
@@ -177,14 +175,10 @@ private IEnumerable<string> ParseWarningCodes(CompilerOptions compilerOptions)
}
private
bool
?
GetNullableBooleanOption
(
CompilerOptions
optionID
)
{
return
(
bool
?)
_options
[(
int
)
optionID
];
}
=>
(
bool
?)
_options
[(
int
)
optionID
];
private
bool
GetBooleanOption
(
CompilerOptions
optionID
)
{
return
GetNullableBooleanOption
(
optionID
).
GetValueOrDefault
(
defaultValue
:
false
);
}
=>
GetNullableBooleanOption
(
optionID
).
GetValueOrDefault
(
defaultValue
:
false
);
private
string
?
GetFilePathRelativeOption
(
CompilerOptions
optionID
)
{
...
...
src/VisualStudio/CSharp/Impl/ProjectSystemShim/EntryPointFinder.cs
浏览文件 @
5ce992ef
...
...
@@ -11,9 +11,7 @@ namespace Microsoft.VisualStudio.LanguageServices.CSharp.ProjectSystemShim
internal
class
EntryPointFinder
:
AbstractEntryPointFinder
{
protected
override
bool
MatchesMainMethodName
(
string
name
)
{
return
name
==
"Main"
;
}
=>
name
==
"Main"
;
public
static
IEnumerable
<
INamedTypeSymbol
>
FindEntryPoints
(
INamespaceSymbol
symbol
)
{
...
...
src/VisualStudio/CSharp/Impl/ProjectSystemShim/TempPECompilerService.cs
浏览文件 @
5ce992ef
...
...
@@ -26,9 +26,7 @@ internal class TempPECompilerService : ICSharpTempPECompilerService
private
readonly
IMetadataService
_metadataService
;
public
TempPECompilerService
(
IMetadataService
metadataService
)
{
_metadataService
=
metadataService
;
}
=>
_metadataService
=
metadataService
;
public
int
CompileTempPE
(
string
pszOutputFileName
,
int
sourceCount
,
string
[]
fileNames
,
string
[]
fileContents
,
int
optionCount
,
string
[]
optionNames
,
object
[]
optionValues
)
{
...
...
src/VisualStudio/CSharp/Impl/Snippets/CSharpSnippetInfoService.cs
浏览文件 @
5ce992ef
...
...
@@ -36,8 +36,6 @@ internal class CSharpSnippetInfoService : AbstractSnippetInfoService
}
public
override
bool
ShouldFormatSnippet
(
SnippetInfo
snippetInfo
)
{
return
_formatTriggeringSnippets
.
Contains
(
snippetInfo
.
Shortcut
);
}
=>
_formatTriggeringSnippets
.
Contains
(
snippetInfo
.
Shortcut
);
}
}
src/VisualStudio/CSharp/Impl/Venus/CSharpAdditionalFormattingRuleLanguageService.cs
浏览文件 @
5ce992ef
...
...
@@ -23,8 +23,6 @@ public CSharpAdditionalFormattingRuleLanguageService()
}
public
AbstractFormattingRule
GetAdditionalCodeGenerationRule
()
{
return
BlankLineInGeneratedMethodFormattingRule
.
Instance
;
}
=>
BlankLineInGeneratedMethodFormattingRule
.
Instance
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录