Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
5cd1dc03
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,发现更多精彩内容 >>
提交
5cd1dc03
编写于
10月 31, 2018
作者:
H
HeeJae Chang
提交者:
Sam Harwell
11月 08, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Simplify auto properties
上级
be42b444
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
35 addition
and
18 deletion
+35
-18
src/Features/Core/Portable/CodeLens/ReferenceLocationDescriptor.cs
...res/Core/Portable/CodeLens/ReferenceLocationDescriptor.cs
+25
-5
src/Workspaces/Core/Portable/Workspace/Solution/TextDocumentState.cs
...ces/Core/Portable/Workspace/Solution/TextDocumentState.cs
+10
-13
未找到文件。
src/Features/Core/Portable/CodeLens/ReferenceLocationDescriptor.cs
浏览文件 @
5cd1dc03
...
...
@@ -9,14 +9,20 @@ namespace Microsoft.CodeAnalysis.CodeLens
/// </summary>
internal
sealed
class
ReferenceLocationDescriptor
{
public
int
LineNumber
{
get
;
}
public
int
ColumnNumber
{
get
;
}
public
Guid
ProjectGuid
{
get
;
}
public
Guid
DocumentGuid
{
get
;
}
/// <summary>
/// Reference's line based on the document content
/// </summary>
public
int
LineNumber
{
get
;
}
/// <summary>
/// Reference's character based on the document content
/// </summary>
public
int
ColumnNumber
{
get
;
}
/// <summary>
/// Language of the reference location
/// </summary>
...
...
@@ -67,7 +73,21 @@ internal sealed class ReferenceLocationDescriptor
/// </summary>
public
string
AfterReferenceText2
{
get
;
}
public
ReferenceLocationDescriptor
(
string
longDescription
,
string
language
,
Glyph
?
glyph
,
int
lineNumber
,
int
columnNumber
,
Guid
projectGuid
,
Guid
documentGuid
,
string
referenceLineText
,
int
referenceStart
,
int
referenceLength
,
string
beforeReferenceText1
,
string
beforeReferenceText2
,
string
afterReferenceText1
,
string
afterReferenceText2
)
public
ReferenceLocationDescriptor
(
string
longDescription
,
string
language
,
Glyph
?
glyph
,
int
lineNumber
,
int
columnNumber
,
Guid
projectGuid
,
Guid
documentGuid
,
string
referenceLineText
,
int
referenceStart
,
int
referenceLength
,
string
beforeReferenceText1
,
string
beforeReferenceText2
,
string
afterReferenceText1
,
string
afterReferenceText2
)
{
LongDescription
=
longDescription
;
Language
=
language
;
...
...
src/Workspaces/Core/Portable/Workspace/Solution/TextDocumentState.cs
浏览文件 @
5cd1dc03
...
...
@@ -16,7 +16,6 @@ namespace Microsoft.CodeAnalysis
internal
partial
class
TextDocumentState
{
protected
readonly
SolutionServices
solutionServices
;
private
readonly
DocumentInfo
.
DocumentAttributes
attributes
;
/// <summary>
/// A direct reference to our source text. This is only kept around in specialized scenarios.
...
...
@@ -46,38 +45,36 @@ internal partial class TextDocumentState
ValueSource
<
DocumentStateChecksums
>
lazyChecksums
)
{
this
.
solutionServices
=
solutionServices
;
this
.
attributes
=
attributes
;
this
.
sourceTextOpt
=
sourceTextOpt
;
this
.
textAndVersionSource
=
textAndVersionSource
;
Attributes
=
attributes
;
// for now, let it re-calculate if anything changed.
// TODO: optimize this so that we only re-calcuate checksums that are actually changed
_lazyChecksums
=
new
AsyncLazy
<
DocumentStateChecksums
>(
ComputeChecksumsAsync
,
cacheResult
:
true
);
}
public
DocumentInfo
.
DocumentAttributes
Attributes
{
get
;
}
public
DocumentId
Id
{
get
{
return
this
.
a
ttributes
.
Id
;
}
get
{
return
A
ttributes
.
Id
;
}
}
public
string
FilePath
{
get
{
return
this
.
attributes
.
FilePath
;
}
}
public
DocumentInfo
.
DocumentAttributes
Attributes
{
get
{
return
this
.
attributes
;
}
get
{
return
Attributes
.
FilePath
;
}
}
public
IReadOnlyList
<
string
>
Folders
{
get
{
return
this
.
a
ttributes
.
Folders
;
}
get
{
return
A
ttributes
.
Folders
;
}
}
public
string
Name
{
get
{
return
this
.
a
ttributes
.
Name
;
}
get
{
return
this
.
A
ttributes
.
Name
;
}
}
public
static
TextDocumentState
Create
(
DocumentInfo
info
,
SolutionServices
services
)
...
...
@@ -323,7 +320,7 @@ public TextDocumentState UpdateText(TextAndVersion newTextAndVersion, Preservati
return
new
TextDocumentState
(
this
.
solutionServices
,
this
.
a
ttributes
,
this
.
A
ttributes
,
sourceTextOpt
:
null
,
textAndVersionSource
:
newTextSource
,
lazyChecksums
:
null
);
...
...
@@ -357,7 +354,7 @@ public TextDocumentState UpdateText(TextLoader loader, PreservationMode mode)
return
new
TextDocumentState
(
this
.
solutionServices
,
this
.
a
ttributes
,
this
.
A
ttributes
,
sourceTextOpt
:
null
,
textAndVersionSource
:
newTextSource
,
lazyChecksums
:
null
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录