Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
c9fce0e0
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,发现更多精彩内容 >>
提交
c9fce0e0
编写于
2月 26, 2015
作者:
B
Brett Forsgren
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix resource string that was causing an invalid xml doc comment to be generated
上级
6c617af2
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
51 addition
and
63 deletion
+51
-63
src/EditorFeatures/CSharpTest/Diagnostics/ImplementInterface/ImplementInterfaceTests.cs
...Diagnostics/ImplementInterface/ImplementInterfaceTests.cs
+10
-19
src/Features/CSharp/CSharpFeaturesResources.Designer.cs
src/Features/CSharp/CSharpFeaturesResources.Designer.cs
+13
-16
src/Features/CSharp/CSharpFeaturesResources.resx
src/Features/CSharp/CSharpFeaturesResources.resx
+28
-28
未找到文件。
src/EditorFeatures/CSharpTest/Diagnostics/ImplementInterface/ImplementInterfaceTests.cs
浏览文件 @
c9fce0e0
...
...
@@ -1676,7 +1676,7 @@ public void TestImplementIDisposable_DisposePattern()
class C : [|IDisposable|]"
,
$@"using System;
class C : IDisposable
{{{
DisposePatternWithIndentation
(
"protected virtual "
,
"C"
,
"public void "
)}
{{{
string
.
Format
(
CSharpFeaturesResources
.
DisposePattern
,
"protected virtual "
,
"C"
,
"public void "
)}
}}
"
,
index
:
1
,
compareTokens
:
false
);
}
...
...
@@ -1719,7 +1719,7 @@ class C : System.IDisposable
class
IDisposable
{{
}}
{
DisposePatternWithIndentation
(
"protected virtual "
,
"C"
,
"void System.IDisposable."
)}
{
string
.
Format
(
CSharpFeaturesResources
.
DisposePattern
,
"protected virtual "
,
"C"
,
"void System.IDisposable."
)}
}}
"
,
index
:
3
,
compareTokens
:
false
);
}
...
...
@@ -1769,7 +1769,7 @@ public void TestImplementIDisposableExplicitly_NoNamespaceImportForSystem()
Test
(
@"class C : [|System.IDisposable|]"
,
$@"class C : System.IDisposable
{{{
DisposePatternWithIndentation
(
"protected virtual "
,
"C"
,
"void System.IDisposable."
)}
{{{
string
.
Format
(
CSharpFeaturesResources
.
DisposePattern
,
"protected virtual "
,
"C"
,
"void System.IDisposable."
)}
}}
"
,
index
:
3
,
compareTokens
:
false
);
}
...
...
@@ -1830,7 +1830,7 @@ public void F()
{{
throw
new
NotImplementedException
();
}}
{
DisposePatternWithIndentation
(
"protected virtual "
,
"C"
,
"public void "
)}
{
string
.
Format
(
CSharpFeaturesResources
.
DisposePattern
,
"protected virtual "
,
"C"
,
"public void "
)}
}}
"
,
index
:
1
,
compareTokens
:
false
);
}
...
...
@@ -1858,7 +1858,7 @@ void I.F()
{{
throw
new
NotImplementedException
();
}}
{
DisposePatternWithIndentation
(
"protected virtual "
,
"C"
,
"void IDisposable."
)}
{
string
.
Format
(
CSharpFeaturesResources
.
DisposePattern
,
"protected virtual "
,
"C"
,
"void IDisposable."
)}
}}
"
,
index
:
3
,
compareTokens
:
false
);
}
...
...
@@ -2295,7 +2295,7 @@ class Program : [|IDisposable|]
class Program : IDisposable
{{
{
DisposePatternWithIndentation
(
"protected virtual "
,
"C"
,
"public void "
)}
{
string
.
Format
(
CSharpFeaturesResources
.
DisposePattern
,
"protected virtual "
,
"C"
,
"public void "
)}
}}
"
,
index
:
1
);
}
...
...
@@ -2318,7 +2318,7 @@ class Program : [|IDisposable|]
class Program : IDisposable
{{
private
bool
DisposedValue
;
{
DisposePatternWithIndentation
(
"protected virtual "
,
"Program"
,
"void IDisposable."
)}
{
string
.
Format
(
CSharpFeaturesResources
.
DisposePattern
,
"protected virtual "
,
"Program"
,
"void IDisposable."
)}
}}
"
,
index
:
3
);
}
...
...
@@ -2397,7 +2397,7 @@ sealed class Program : [|IDisposable|]
sealed class Program : IDisposable
{{
{
DisposePatternWithIndentation
(
""
,
"Program"
,
"void IDisposable."
)}
{
string
.
Format
(
CSharpFeaturesResources
.
DisposePattern
,
""
,
"Program"
,
"void IDisposable."
)}
}}
"
,
index
:
3
);
}
...
...
@@ -2522,7 +2522,7 @@ public List<AggregateException> M(Dictionary<Exception, List<AggregateException>
{{
throw
new
NotImplementedException
();
}}
{
DisposePatternWithIndentation
(
"protected virtual "
,
"C"
,
"public void "
)}
{
string
.
Format
(
CSharpFeaturesResources
.
DisposePattern
,
"protected virtual "
,
"C"
,
"public void "
)}
}}
"
,
index
:
1
,
compareTokens
:
false
);
}
...
...
@@ -2569,21 +2569,12 @@ bool IEquatable<int>.Equals(int other)
{{
throw
new
NotImplementedException
();
}}
{
DisposePatternWithIndentation
(
"protected virtual "
,
"C"
,
"void IDisposable."
)}
{
string
.
Format
(
CSharpFeaturesResources
.
DisposePattern
,
"protected virtual "
,
"C"
,
"void IDisposable."
)}
}}
partial class C
{{
}}
"
,
index
:
3
,
compareTokens
:
false
);
}
private
static
string
DisposePatternWithIndentation
(
string
disposeMethodModifiers
,
string
className
,
string
interfaceMethodModifiers
,
string
additionalIndentation
=
" "
)
{
var
lines
=
string
.
Format
(
CSharpFeaturesResources
.
DisposePattern
,
disposeMethodModifiers
,
className
,
interfaceMethodModifiers
)
.
Split
(
'\n'
)
.
Select
(
line
=>
line
.
TrimEnd
())
.
Select
(
line
=>
line
.
Length
>
0
?
additionalIndentation
+
line
:
line
);
// only indent lines with content
return
string
.
Join
(
"\r\n"
,
lines
);
}
}
}
src/Features/CSharp/CSharpFeaturesResources.Designer.cs
浏览文件 @
c9fce0e0
...
...
@@ -188,26 +188,23 @@ internal class CSharpFeaturesResources {
/// <summary>
/// Looks up a localized string similar to
///#region IDisposable Support
///private bool disposedValue = false; // To detect redundant calls
///
#region IDisposable Support
///
private bool disposedValue = false; // To detect redundant calls
///
///{0}void Dispose(bool disposing)
///{{
/// if (!disposedValue)
/// {0}void Dispose(bool disposing)
/// {{
/// if (
disposing
)
/// if (
!disposedValue
)
/// {{
/// // TODO: dispose managed state (managed objects).
/// }}
///
/// // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
/// // TODO: set large fields to null.
///
/// disposedValue = true;
/// }}
///}}
/// if (disposing)
/// {{
/// // TODO: dispose managed state (managed objects).
/// }}
///
///// TODO: override a finalizer only if Disp [rest of string was truncated]";.
/// // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
/// // TODO: set large fields to null.
///
/// disposedValue = true;
/// [rest of string was truncated]";.
/// </summary>
internal
static
string
DisposePattern
{
get
{
...
...
src/Features/CSharp/CSharpFeaturesResources.resx
浏览文件 @
c9fce0e0
...
...
@@ -257,40 +257,40 @@
</data>
<data
name=
"DisposePattern"
xml:space=
"preserve"
>
<value>
#region IDisposable Support
private bool disposedValue = false; // To detect redundant calls
#region IDisposable Support
private bool disposedValue = false; // To detect redundant calls
{0}void Dispose(bool disposing)
{{
if (!disposedValue)
{0}void Dispose(bool disposing)
{{
if (
disposing
)
if (
!disposedValue
)
{{
// TODO: dispose managed state (managed objects).
if (disposing)
{{
// TODO: dispose managed state (managed objects).
}}
// TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
// TODO: set large fields to null.
disposedValue = true;
}}
// TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
// TODO: set large fields to null.
disposedValue = true;
}}
}}
// TODO: override a finalizer only if Dispose(bool disposing) above has code to free unmanaged resources.
// ~{1}() {{
// // Do not change this code. Put cleanup code in Dispose(bool disposing) above.
// Dispose(false);
// }}
// This code added to correctly implement the disposable pattern.
{2}Dispose()
{{
// Do not change this code. Put cleanup code in Dispose(bool disposing) above.
Dispose(true);
// TODO: uncomment the following line if the finalizer is overridden above.
// GC.SuppressFinalize(this);
}}
#endregion
</value>
// TODO: override a finalizer only if Dispose(bool disposing) above has code to free unmanaged resources.
// ~{1}() {{
// // Do not change this code. Put cleanup code in Dispose(bool disposing) above.
// Dispose(false);
// }}
// This code added to correctly implement the disposable pattern.
{2}Dispose()
{{
// Do not change this code. Put cleanup code in Dispose(bool disposing) above.
Dispose(true);
// TODO: uncomment the following line if the finalizer is overridden above.
// GC.SuppressFinalize(this);
}}
#endregion
</value>
</data>
<data
name=
"AutoselectDisabledDueToPotentialImplicitArray"
xml:space=
"preserve"
>
<value>
Autoselect disabled due to potential implicit array creation.
</value>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录