Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
bffb08c0
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,发现更多精彩内容 >>
提交
bffb08c0
编写于
2月 06, 2020
作者:
J
Jared Parsons
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MS.CA.CSharp uses framework nullable
上级
aaed1133
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
13 deletion
+9
-13
src/Compilers/CSharp/Portable/Compilation/CSharpCompilation.cs
...ompilers/CSharp/Portable/Compilation/CSharpCompilation.cs
+8
-8
src/Compilers/CSharp/Portable/Microsoft.CodeAnalysis.CSharp.csproj
...lers/CSharp/Portable/Microsoft.CodeAnalysis.CSharp.csproj
+0
-4
src/Compilers/CSharp/Portable/Symbols/ReferenceManager.cs
src/Compilers/CSharp/Portable/Symbols/ReferenceManager.cs
+1
-1
未找到文件。
src/Compilers/CSharp/Portable/Compilation/CSharpCompilation.cs
浏览文件 @
bffb08c0
...
...
@@ -1020,7 +1020,7 @@ internal override IEnumerable<ReferenceDirective> ReferenceDirectives
{
RoslynDebug
.
Assert
(
directive
.
SyntaxTree
.
FilePath
is
object
);
MetadataReference
reference
;
MetadataReference
?
reference
;
return
ReferenceDirectiveMap
.
TryGetValue
((
directive
.
SyntaxTree
.
FilePath
,
directive
.
File
.
ValueText
),
out
reference
)
?
reference
:
null
;
}
...
...
@@ -1268,13 +1268,13 @@ internal new NamespaceSymbol GlobalNamespace
return
null
;
}
private
ConcurrentDictionary
<
string
?
,
NamespaceSymbol
>?
_externAliasTargets
;
private
ConcurrentDictionary
<
string
,
NamespaceSymbol
>?
_externAliasTargets
;
internal
bool
GetExternAliasTarget
(
string
?
aliasName
,
out
NamespaceSymbol
?
@namespace
)
internal
bool
GetExternAliasTarget
(
string
aliasName
,
out
NamespaceSymbol
?
@namespace
)
{
if
(
_externAliasTargets
==
null
)
{
Interlocked
.
CompareExchange
(
ref
_externAliasTargets
,
new
ConcurrentDictionary
<
string
?
,
NamespaceSymbol
>(),
null
);
Interlocked
.
CompareExchange
(
ref
_externAliasTargets
,
new
ConcurrentDictionary
<
string
,
NamespaceSymbol
>(),
null
);
}
else
if
(
_externAliasTargets
.
TryGetValue
(
aliasName
,
out
@namespace
))
{
...
...
@@ -1443,7 +1443,7 @@ private static CSDiagnosticInfo CreateReflectionTypeNotFoundError(Type type)
// The type or namespace name '{0}' could not be found in the global namespace (are you missing an assembly reference?)
return
new
CSDiagnosticInfo
(
ErrorCode
.
ERR_GlobalSingleTypeNameNotFound
,
new
object
[]
{
type
.
AssemblyQualifiedName
},
new
object
[]
{
type
.
AssemblyQualifiedName
??
""
},
ImmutableArray
<
Symbol
>.
Empty
,
ImmutableArray
<
Location
>.
Empty
);
...
...
@@ -2045,7 +2045,7 @@ internal BinderFactory GetBinderFactory(SyntaxTree syntaxTree)
binderFactories
=
Interlocked
.
CompareExchange
(
ref
_binderFactories
,
binderFactories
,
null
)
??
binderFactories
;
}
BinderFactory
previousFactory
;
BinderFactory
?
previousFactory
;
var
previousWeakReference
=
binderFactories
[
treeNum
];
if
(
previousWeakReference
!=
null
&&
previousWeakReference
.
TryGetTarget
(
out
previousFactory
))
{
...
...
@@ -2062,7 +2062,7 @@ private BinderFactory AddNewFactory(SyntaxTree syntaxTree, [NotNull] ref WeakRef
while
(
true
)
{
BinderFactory
previousFactory
;
BinderFactory
?
previousFactory
;
WeakReference
<
BinderFactory
>?
previousWeakReference
=
slot
;
if
(
previousWeakReference
!=
null
&&
previousWeakReference
.
TryGetTarget
(
out
previousFactory
))
{
...
...
@@ -3620,7 +3620,7 @@ public IEnumerable<Symbol> GetSymbolsWithName()
}
private
NamespaceOrTypeSymbol
?
GetCachedSymbol
(
MergedNamespaceOrTypeDeclaration
declaration
)
=>
_cache
.
TryGetValue
(
declaration
,
out
NamespaceOrTypeSymbol
symbol
)
=>
_cache
.
TryGetValue
(
declaration
,
out
NamespaceOrTypeSymbol
?
symbol
)
?
symbol
:
null
;
...
...
src/Compilers/CSharp/Portable/Microsoft.CodeAnalysis.CSharp.csproj
浏览文件 @
bffb08c0
...
...
@@ -15,10 +15,6 @@
<PackageDescription>
.NET Compiler Platform ("Roslyn") support for C#, Microsoft.CodeAnalysis.CSharp.dll.
</PackageDescription>
<!-- Disable the nullable warnings when compiling for netcoreapp3.1 during our transition period -->
<DisableNullableWarnings
Condition=
"'$(TargetFramework)' == 'netcoreapp3.1'"
>
true
</DisableNullableWarnings>
<DisableNullableWarnings
Condition=
"'$(TargetFramework)' == 'netstandard2.0'"
>
false
</DisableNullableWarnings>
</PropertyGroup>
<ItemGroup>
<ProjectReference
Include=
"..\..\Core\Portable\Microsoft.CodeAnalysis.csproj"
/>
...
...
src/Compilers/CSharp/Portable/Symbols/ReferenceManager.cs
浏览文件 @
bffb08c0
...
...
@@ -828,7 +828,7 @@ private static void UpdateSymbolCacheNoLock(List<int> newSymbols, ImmutableArray
AssemblyIdentity
assemblyIdentity
,
ref
Dictionary
<
AssemblyIdentity
,
MissingAssemblySymbol
>?
missingAssemblies
)
{
MissingAssemblySymbol
missingAssembly
;
MissingAssemblySymbol
?
missingAssembly
;
if
(
missingAssemblies
==
null
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录