Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
1f293366
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,发现更多精彩内容 >>
提交
1f293366
编写于
8月 27, 2015
作者:
R
Ravi Chande
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
CR feedback
上级
781fbc15
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
13 addition
and
13 deletion
+13
-13
src/EditorFeatures/Core/Implementation/CallHierarchy/CallHierarchyProvider.cs
...ore/Implementation/CallHierarchy/CallHierarchyProvider.cs
+1
-1
src/EditorFeatures/Core/Implementation/GoToDefinition/GoToDefinitionHelpers.cs
...re/Implementation/GoToDefinition/GoToDefinitionHelpers.cs
+1
-1
src/EditorFeatures/Test2/Utilities/MockSymbolNavigationServiceProvider.vb
...es/Test2/Utilities/MockSymbolNavigationServiceProvider.vb
+1
-1
src/Features/Core/Portable/Navigation/DefaultSymbolNavigationService.cs
...ore/Portable/Navigation/DefaultSymbolNavigationService.cs
+1
-1
src/Features/Core/Portable/Navigation/ISymbolNavigationService.cs
...ures/Core/Portable/Navigation/ISymbolNavigationService.cs
+1
-1
src/VisualStudio/Core/Def/Implementation/Library/FindResults/TreeItems/MetadataDefinitionTreeItem.cs
...brary/FindResults/TreeItems/MetadataDefinitionTreeItem.cs
+1
-1
src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioSymbolNavigationService.cs
...entation/Workspace/VisualStudioSymbolNavigationService.cs
+1
-1
src/Workspaces/Core/Portable/CodeGeneration/AbstractCodeGenerationService.cs
.../Portable/CodeGeneration/AbstractCodeGenerationService.cs
+5
-5
src/Workspaces/VisualBasic/Portable/CodeGeneration/NamespaceGenerator.vb
...VisualBasic/Portable/CodeGeneration/NamespaceGenerator.vb
+1
-1
未找到文件。
src/EditorFeatures/Core/Implementation/CallHierarchy/CallHierarchyProvider.cs
浏览文件 @
1f293366
...
@@ -132,7 +132,7 @@ public void NavigateTo(SymbolKey id, Project project, CancellationToken cancella
...
@@ -132,7 +132,7 @@ public void NavigateTo(SymbolKey id, Project project, CancellationToken cancella
{
{
var
compilation
=
project
.
GetCompilationAsync
(
cancellationToken
).
WaitAndGetResult
(
cancellationToken
);
var
compilation
=
project
.
GetCompilationAsync
(
cancellationToken
).
WaitAndGetResult
(
cancellationToken
);
var
resolution
=
id
.
Resolve
(
compilation
,
cancellationToken
:
cancellationToken
);
var
resolution
=
id
.
Resolve
(
compilation
,
cancellationToken
:
cancellationToken
);
project
.
Solution
.
Workspace
.
Services
.
GetService
<
ISymbolNavigationService
>().
TryNavigateToSymbol
(
resolution
.
Symbol
,
project
,
usePreviewTab
:
true
);
project
.
Solution
.
Workspace
.
Services
.
GetService
<
ISymbolNavigationService
>().
TryNavigateToSymbol
(
resolution
.
Symbol
,
project
,
usePreviewTab
:
true
,
cancellationToken
:
CancellationToken
.
None
);
}
}
}
}
}
}
src/EditorFeatures/Core/Implementation/GoToDefinition/GoToDefinitionHelpers.cs
浏览文件 @
1f293366
...
@@ -70,7 +70,7 @@ internal static class GoToDefinitionHelpers
...
@@ -70,7 +70,7 @@ internal static class GoToDefinitionHelpers
// to a metadata-as-source view.
// to a metadata-as-source view.
var
symbolNavigationService
=
solution
.
Workspace
.
Services
.
GetService
<
ISymbolNavigationService
>();
var
symbolNavigationService
=
solution
.
Workspace
.
Services
.
GetService
<
ISymbolNavigationService
>();
return
symbolNavigationService
.
TryNavigateToSymbol
(
symbol
,
project
,
usePreviewTab
:
true
,
cancellationToken
:
cancellationToken
);
return
symbolNavigationService
.
TryNavigateToSymbol
(
symbol
,
project
,
cancellationToken
:
cancellationToken
,
usePreviewTab
:
true
);
}
}
// If we have a single location, then just navigate to it.
// If we have a single location, then just navigate to it.
...
...
src/EditorFeatures/Test2/Utilities/MockSymbolNavigationServiceProvider.vb
浏览文件 @
1f293366
...
@@ -37,7 +37,7 @@ Namespace Microsoft.CodeAnalysis.Editor.UnitTests.Utilities
...
@@ -37,7 +37,7 @@ Namespace Microsoft.CodeAnalysis.Editor.UnitTests.Utilities
Public
NavigationLineNumberReturnValue
As
Integer
=
0
Public
NavigationLineNumberReturnValue
As
Integer
=
0
Public
NavigationCharOffsetReturnValue
As
Integer
=
0
Public
NavigationCharOffsetReturnValue
As
Integer
=
0
Public
Function
TryNavigateToSymbol
(
symbol
As
ISymbol
,
project
As
Project
,
Optional
usePreviewTab
As
Boolean
=
False
,
Optional
cancellationToken
As
CancellationToken
=
Nothing
)
As
Boolean
Implements
ISymbolNavigationService
.
TryNavigateToSymbol
Public
Function
TryNavigateToSymbol
(
symbol
As
ISymbol
,
project
As
Project
,
cancellationToken
As
CancellationToken
,
Optional
usePreviewTab
As
Boolean
=
False
)
As
Boolean
Implements
ISymbolNavigationService
.
TryNavigateToSymbol
Me
.
TryNavigateToSymbolProvidedSymbol
=
symbol
Me
.
TryNavigateToSymbolProvidedSymbol
=
symbol
Me
.
TryNavigateToSymbolProvidedProject
=
project
Me
.
TryNavigateToSymbolProvidedProject
=
project
Me
.
TryNavigateToSymbolProvidedUsePreviewTab
=
usePreviewTab
Me
.
TryNavigateToSymbolProvidedUsePreviewTab
=
usePreviewTab
...
...
src/Features/Core/Portable/Navigation/DefaultSymbolNavigationService.cs
浏览文件 @
1f293366
...
@@ -6,7 +6,7 @@ namespace Microsoft.CodeAnalysis.Navigation
...
@@ -6,7 +6,7 @@ namespace Microsoft.CodeAnalysis.Navigation
{
{
internal
class
DefaultSymbolNavigationService
:
ISymbolNavigationService
internal
class
DefaultSymbolNavigationService
:
ISymbolNavigationService
{
{
public
bool
TryNavigateToSymbol
(
ISymbol
symbol
,
Project
project
,
bool
usePreviewTab
=
false
,
CancellationToken
cancellationToken
=
default
(
CancellationToken
)
)
public
bool
TryNavigateToSymbol
(
ISymbol
symbol
,
Project
project
,
CancellationToken
cancellationToken
=
default
(
CancellationToken
),
bool
usePreviewTab
=
false
)
{
{
return
false
;
return
false
;
}
}
...
...
src/Features/Core/Portable/Navigation/ISymbolNavigationService.cs
浏览文件 @
1f293366
...
@@ -15,7 +15,7 @@ internal interface ISymbolNavigationService : IWorkspaceService
...
@@ -15,7 +15,7 @@ internal interface ISymbolNavigationService : IWorkspaceService
/// <param name="symbol">The symbol to navigate to</param>
/// <param name="symbol">The symbol to navigate to</param>
/// <param name="usePreviewTab">Indicates whether a preview tab should be used if the
/// <param name="usePreviewTab">Indicates whether a preview tab should be used if the
/// containing document is opened in a new tab. Defaults to false.</param>
/// containing document is opened in a new tab. Defaults to false.</param>
bool
TryNavigateToSymbol
(
ISymbol
symbol
,
Project
project
,
bool
usePreviewTab
=
false
,
CancellationToken
cancellationToken
=
default
(
CancellationToken
)
);
bool
TryNavigateToSymbol
(
ISymbol
symbol
,
Project
project
,
CancellationToken
cancellationToken
,
bool
usePreviewTab
=
false
);
/// <returns>True if the navigation was handled, indicating that the caller should not
/// <returns>True if the navigation was handled, indicating that the caller should not
/// perform the navigation.</returns>
/// perform the navigation.</returns>
...
...
src/VisualStudio/Core/Def/Implementation/Library/FindResults/TreeItems/MetadataDefinitionTreeItem.cs
浏览文件 @
1f293366
...
@@ -40,7 +40,7 @@ public override int GoToSource()
...
@@ -40,7 +40,7 @@ public override int GoToSource()
if
(
symbol
!=
null
&&
referencingProject
!=
null
)
if
(
symbol
!=
null
&&
referencingProject
!=
null
)
{
{
var
navigationService
=
_workspace
.
Services
.
GetService
<
ISymbolNavigationService
>();
var
navigationService
=
_workspace
.
Services
.
GetService
<
ISymbolNavigationService
>();
return
navigationService
.
TryNavigateToSymbol
(
symbol
,
referencingProject
)
return
navigationService
.
TryNavigateToSymbol
(
symbol
,
referencingProject
,
CancellationToken
.
None
)
?
VSConstants
.
S_OK
?
VSConstants
.
S_OK
:
VSConstants
.
E_FAIL
;
:
VSConstants
.
E_FAIL
;
}
}
...
...
src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioSymbolNavigationService.cs
浏览文件 @
1f293366
...
@@ -49,7 +49,7 @@ internal partial class VisualStudioSymbolNavigationService : ForegroundThreadAff
...
@@ -49,7 +49,7 @@ internal partial class VisualStudioSymbolNavigationService : ForegroundThreadAff
_metadataAsSourceFileService
=
componentModel
.
GetService
<
IMetadataAsSourceFileService
>();
_metadataAsSourceFileService
=
componentModel
.
GetService
<
IMetadataAsSourceFileService
>();
}
}
public
bool
TryNavigateToSymbol
(
ISymbol
symbol
,
Project
project
,
bool
usePreviewTab
=
false
,
CancellationToken
cancellationToken
=
default
(
CancellationToken
)
)
public
bool
TryNavigateToSymbol
(
ISymbol
symbol
,
Project
project
,
CancellationToken
cancellationToken
=
default
(
CancellationToken
),
bool
usePreviewTab
=
false
)
{
{
if
(
project
==
null
||
symbol
==
null
)
if
(
project
==
null
||
symbol
==
null
)
{
{
...
...
src/Workspaces/Core/Portable/CodeGeneration/AbstractCodeGenerationService.cs
浏览文件 @
1f293366
...
@@ -303,7 +303,7 @@ public Task<Document> AddEventAsync(Solution solution, INamedTypeSymbol destinat
...
@@ -303,7 +303,7 @@ public Task<Document> AddEventAsync(Solution solution, INamedTypeSymbol destinat
return
GetEditAsync
(
return
GetEditAsync
(
solution
,
solution
,
destination
,
destination
,
(
t
,
opts
,
ai
,
_
)
=>
AddEvent
(
t
,
@event
,
opts
,
ai
),
(
t
,
opts
,
ai
,
ct
)
=>
AddEvent
(
t
,
@event
,
opts
,
ai
),
options
,
options
,
new
[]
{
@event
},
new
[]
{
@event
},
cancellationToken
);
cancellationToken
);
...
@@ -314,7 +314,7 @@ public Task<Document> AddFieldAsync(Solution solution, INamedTypeSymbol destinat
...
@@ -314,7 +314,7 @@ public Task<Document> AddFieldAsync(Solution solution, INamedTypeSymbol destinat
return
GetEditAsync
(
return
GetEditAsync
(
solution
,
solution
,
destination
,
destination
,
(
t
,
opts
,
ai
,
_
)
=>
AddField
(
t
,
field
,
opts
,
ai
),
(
t
,
opts
,
ai
,
ct
)
=>
AddField
(
t
,
field
,
opts
,
ai
),
options
,
options
,
new
[]
{
field
},
new
[]
{
field
},
cancellationToken
);
cancellationToken
);
...
@@ -324,7 +324,7 @@ public Task<Document> AddPropertyAsync(Solution solution, INamedTypeSymbol desti
...
@@ -324,7 +324,7 @@ public Task<Document> AddPropertyAsync(Solution solution, INamedTypeSymbol desti
{
{
return
GetEditAsync
(
return
GetEditAsync
(
solution
,
destination
,
solution
,
destination
,
(
t
,
opts
,
ai
,
_
)
=>
AddProperty
(
t
,
property
,
opts
,
ai
),
(
t
,
opts
,
ai
,
ct
)
=>
AddProperty
(
t
,
property
,
opts
,
ai
),
options
,
new
[]
{
property
},
options
,
new
[]
{
property
},
cancellationToken
);
cancellationToken
);
}
}
...
@@ -333,7 +333,7 @@ public Task<Document> AddNamedTypeAsync(Solution solution, INamedTypeSymbol dest
...
@@ -333,7 +333,7 @@ public Task<Document> AddNamedTypeAsync(Solution solution, INamedTypeSymbol dest
{
{
return
GetEditAsync
(
return
GetEditAsync
(
solution
,
destination
,
solution
,
destination
,
(
t
,
opts
,
ai
,
_
)
=>
AddNamedType
(
t
,
namedType
,
opts
,
ai
,
_
),
(
t
,
opts
,
ai
,
ct
)
=>
AddNamedType
(
t
,
namedType
,
opts
,
ai
,
ct
),
options
,
new
[]
{
namedType
},
options
,
new
[]
{
namedType
},
cancellationToken
);
cancellationToken
);
}
}
...
@@ -358,7 +358,7 @@ public Task<Document> AddMethodAsync(Solution solution, INamedTypeSymbol destina
...
@@ -358,7 +358,7 @@ public Task<Document> AddMethodAsync(Solution solution, INamedTypeSymbol destina
{
{
return
GetEditAsync
(
return
GetEditAsync
(
solution
,
destination
,
solution
,
destination
,
(
t
,
opts
,
ai
,
_
)
=>
AddMethod
(
t
,
method
,
opts
,
ai
),
(
t
,
opts
,
ai
,
ct
)
=>
AddMethod
(
t
,
method
,
opts
,
ai
),
options
,
new
[]
{
method
},
cancellationToken
);
options
,
new
[]
{
method
},
cancellationToken
);
}
}
...
...
src/Workspaces/VisualBasic/Portable/CodeGeneration/NamespaceGenerator.vb
浏览文件 @
1f293366
...
@@ -15,7 +15,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.CodeGeneration
...
@@ -15,7 +15,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.CodeGeneration
[
namespace
]
As
INamespaceSymbol
,
[
namespace
]
As
INamespaceSymbol
,
options
As
CodeGenerationOptions
,
options
As
CodeGenerationOptions
,
availableIndices
As
IList
(
Of
Boolean
),
availableIndices
As
IList
(
Of
Boolean
),
cancellationToken
As
CancellationToken
)
As
CompilationUnitSyntax
cancellationToken
As
CancellationToken
)
As
CompilationUnitSyntax
Dim
declaration
=
GenerateNamespaceDeclaration
(
service
,
[
namespace
]
,
options
,
cancellationToken
)
Dim
declaration
=
GenerateNamespaceDeclaration
(
service
,
[
namespace
]
,
options
,
cancellationToken
)
If
Not
TypeOf
declaration
Is
NamespaceBlockSyntax
Then
If
Not
TypeOf
declaration
Is
NamespaceBlockSyntax
Then
Throw
New
ArgumentException
(
VBWorkspaceResources
.
NamespaceCannotBeAdded
)
Throw
New
ArgumentException
(
VBWorkspaceResources
.
NamespaceCannotBeAdded
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录