Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
3be4deda
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,发现更多精彩内容 >>
未验证
提交
3be4deda
编写于
12月 20, 2018
作者:
J
Jared Parsons
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Delete PortableStrongNameProvider
上级
56be4132
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
14 addition
and
84 deletion
+14
-84
src/Compilers/CSharp/Test/Emit/Attributes/EmitTestStrongNameProvider.cs
...CSharp/Test/Emit/Attributes/EmitTestStrongNameProvider.cs
+1
-1
src/Compilers/CSharp/Test/Emit/Attributes/InternalsVisibleToAndStrongNameTests.cs
...t/Emit/Attributes/InternalsVisibleToAndStrongNameTests.cs
+1
-1
src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenTupleTest.cs
src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenTupleTest.cs
+2
-3
src/Compilers/CSharp/Test/Emit/Emit/CompilationEmitTests.cs
src/Compilers/CSharp/Test/Emit/Emit/CompilationEmitTests.cs
+5
-8
src/Compilers/Core/Portable/StrongName/PortableStrongNameProvider.cs
...rs/Core/Portable/StrongName/PortableStrongNameProvider.cs
+0
-59
src/Compilers/VisualBasic/Test/Emit/Attributes/EmitTestStrongNameProvider.vb
...lBasic/Test/Emit/Attributes/EmitTestStrongNameProvider.vb
+1
-1
src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenTuples.vb
src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenTuples.vb
+2
-3
src/Compilers/VisualBasic/Test/Emit/PrivateProtected.vb
src/Compilers/VisualBasic/Test/Emit/PrivateProtected.vb
+1
-1
src/Test/Utilities/Portable/Platform/Custom/SigningTestHelpers.cs
.../Utilities/Portable/Platform/Custom/SigningTestHelpers.cs
+1
-7
未找到文件。
src/Compilers/CSharp/Test/Emit/Attributes/EmitTestStrongNameProvider.cs
浏览文件 @
3be4deda
...
...
@@ -149,7 +149,7 @@ class C
{
public static void Main(string[] args) { }
}"
;
var
testProvider
=
new
StrongNameProviderWithBadInputStream
(
s_defaultDesktop
Provider
);
var
testProvider
=
new
StrongNameProviderWithBadInputStream
(
DefaultDesktopStrongName
Provider
);
var
options
=
TestOptions
.
DebugExe
.
WithStrongNameProvider
(
testProvider
)
.
WithCryptoKeyContainer
(
"RoslynTestContainer"
);
...
...
src/Compilers/CSharp/Test/Emit/Attributes/InternalsVisibleToAndStrongNameTests.cs
浏览文件 @
3be4deda
...
...
@@ -943,7 +943,7 @@ End Sub
syntaxTrees
:
new
[]
{
VisualBasic
.
VisualBasicSyntaxTree
.
ParseText
(
s
)
},
references
:
new
[]
{
MscorlibRef_v4_0_30316_17626
},
assemblyName
:
"Paul"
,
options
:
new
VisualBasic
.
VisualBasicCompilationOptions
(
OutputKind
.
DynamicallyLinkedLibrary
).
WithStrongNameProvider
(
s_defaultDesktop
Provider
));
options
:
new
VisualBasic
.
VisualBasicCompilationOptions
(
OutputKind
.
DynamicallyLinkedLibrary
).
WithStrongNameProvider
(
DefaultDesktopStrongName
Provider
));
other
.
VerifyDiagnostics
();
var
requestor
=
CreateCompilation
(
...
...
src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenTupleTest.cs
浏览文件 @
3be4deda
...
...
@@ -21747,9 +21747,8 @@ public void ValueTupleBase_AssemblyUnification()
public class A
{
}";
var signedDllOptions = TestOptions.ReleaseDll.
WithCryptoKeyFile(SigningTestHelpers.KeyPairFile).
WithStrongNameProvider(SigningTestHelpers.s_defaultDesktopProvider);
var signedDllOptions = TestOptions.SigningReleaseDll.
WithCryptoKeyFile(SigningTestHelpers.KeyPairFile);
var comp0v1 = CreateCompilationWithMscorlib40(source0v1, assemblyName: "A", options: signedDllOptions);
comp0v1.VerifyDiagnostics();
var ref0v1 = comp0v1.EmitToImageReference();
src/Compilers/CSharp/Test/Emit/Emit/CompilationEmitTests.cs
浏览文件 @
3be4deda
...
...
@@ -1524,9 +1524,8 @@ public void RefAssembly_PublicSigning()
[
ConditionalFact
(
typeof
(
WindowsOnly
),
Reason
=
"https://github.com/dotnet/roslyn/issues/30152"
)]
public
void
RefAssembly_StrongNameProvider
()
{
var
signedDllOptions
=
TestOptions
.
ReleaseDll
.
WithCryptoKeyFile
(
SigningTestHelpers
.
KeyPairFile
).
WithStrongNameProvider
(
s_defaultDesktopProvider
);
var
signedDllOptions
=
TestOptions
.
SigningReleaseDll
.
WithCryptoKeyFile
(
SigningTestHelpers
.
KeyPairFile
);
var
comp
=
CreateCompilation
(
"public class C{}"
,
options
:
signedDllOptions
);
...
...
@@ -1543,9 +1542,8 @@ public void RefAssembly_StrongNameProvider()
[
ConditionalFact
(
typeof
(
WindowsOnly
),
Reason
=
"https://github.com/dotnet/roslyn/issues/30152"
)]
public
void
RefAssembly_StrongNameProvider_Arm64
()
{
var
signedDllOptions
=
TestOptions
.
ReleaseDll
.
var
signedDllOptions
=
TestOptions
.
Signing
ReleaseDll
.
WithCryptoKeyFile
(
SigningTestHelpers
.
KeyPairFile
).
WithStrongNameProvider
(
s_defaultDesktopProvider
).
WithPlatform
(
Platform
.
Arm64
).
WithDeterministic
(
true
);
...
...
@@ -1564,10 +1562,9 @@ public void RefAssembly_StrongNameProvider_Arm64()
[
ConditionalFact
(
typeof
(
WindowsOnly
),
Reason
=
"https://github.com/dotnet/roslyn/issues/30152"
)]
public
void
RefAssembly_StrongNameProviderAndDelaySign
()
{
var
signedDllOptions
=
TestOptions
.
ReleaseDll
var
signedDllOptions
=
TestOptions
.
Signing
ReleaseDll
.
WithCryptoKeyFile
(
SigningTestHelpers
.
KeyPairFile
)
.
WithDelaySign
(
true
)
.
WithStrongNameProvider
(
s_defaultDesktopProvider
);
.
WithDelaySign
(
true
);
var
comp
=
CreateCompilation
(
"public class C{}"
,
options
:
signedDllOptions
);
...
...
src/Compilers/Core/Portable/StrongName/PortableStrongNameProvider.cs
已删除
100644 → 0
浏览文件 @
56be4132
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Immutable
;
using
System.Diagnostics
;
using
System.IO
;
using
System.Linq
;
using
System.Reflection.Metadata
;
using
System.Security.Cryptography
;
using
System.Text
;
using
Microsoft.Cci
;
using
Roslyn.Utilities
;
namespace
Microsoft.CodeAnalysis
{
// TODO: delete this
internal
sealed
class
PortableStrongNameProvider
:
StrongNameProvider
{
private
readonly
DesktopStrongNameProvider
_provider
;
public
PortableStrongNameProvider
(
ImmutableArray
<
string
>
keySearchPaths
,
StrongNameFileSystem
strongNameFileSystem
,
string
tempPath
)
{
_provider
=
new
DesktopStrongNameProvider
(
keySearchPaths
,
tempPath
,
strongNameFileSystem
);
}
public
override
int
GetHashCode
()
{
return
0
;
}
internal
override
StrongNameFileSystem
FileSystem
=>
_provider
.
FileSystem
;
internal
override
StrongNameKeys
CreateKeys
(
string
keyFilePath
,
string
keyContainerName
,
bool
hasCounterSignature
,
CommonMessageProvider
messageProvider
)
{
return
_provider
.
CreateKeys
(
keyFilePath
,
keyContainerName
,
hasCounterSignature
,
messageProvider
);
}
internal
override
void
SignPeBuilder
(
ExtendedPEBuilder
peBuilder
,
BlobBuilder
peBlob
,
RSAParameters
privateKey
)
{
_provider
.
SignPeBuilder
(
peBuilder
,
peBlob
,
privateKey
);
}
internal
override
Stream
CreateInputStream
()
{
return
_provider
.
CreateInputStream
();
}
public
override
bool
Equals
(
object
obj
)
{
if
(!(
obj
is
PortableStrongNameProvider
other
))
{
return
false
;
}
return
FileSystem
==
other
.
FileSystem
;
}
}
}
src/Compilers/VisualBasic/Test/Emit/Attributes/EmitTestStrongNameProvider.vb
浏览文件 @
3be4deda
...
...
@@ -54,7 +54,7 @@ Partial Public Class InternalsVisibleToAndStrongNameTests
<
ConditionalFact
(
GetType
(
WindowsOnly
),
Reason
:
=
ConditionalSkipReason
.
TestExecutionNeedsWindowsTypes
)
>
Public
Sub
BadInputStream
()
SigningTestHelpers
.
InstallKey
()
Dim
testProvider
=
New
StrongNameProviderWithBadInputStream
(
s_defaultDesktop
Provider
)
Dim
testProvider
=
New
StrongNameProviderWithBadInputStream
(
DefaultDesktopStrongName
Provider
)
Dim
options
=
TestOptions
.
DebugDll
.
WithStrongNameProvider
(
testProvider
).
WithCryptoKeyContainer
(
"RoslynTestContainer"
)
Dim
comp
=
CreateCompilationWithMscorlib40
(
...
...
src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenTuples.vb
浏览文件 @
3be4deda
...
...
@@ -18725,9 +18725,8 @@ BC30652: Reference required to assembly '5a03232e-1a0f-4d1b-99ba-5d7b40ea931e, V
<ConditionalFact(GetType(WindowsOnly), Reason:=ConditionalSkipReason.TestExecutionNeedsWindowsTypes)>
Public Sub ValueTupleBase_AssemblyUnification()
Dim signedDllOptions = TestOptions.ReleaseDll.
WithCryptoKeyFile(SigningTestHelpers.KeyPairFile).
WithStrongNameProvider(s_defaultDesktopProvider)
Dim signedDllOptions = TestOptions.SigningReleaseDll.
WithCryptoKeyFile(SigningTestHelpers.KeyPairFile)
Dim comp0v1 = CreateCompilationWithMscorlib40(
<compilation name="A">
<file name="a.vb"><![CDATA[
...
...
src/Compilers/VisualBasic/Test/Emit/PrivateProtected.vb
浏览文件 @
3be4deda
...
...
@@ -7,7 +7,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.UnitTests
Public
Class
PrivateProtected
Inherits
BasicTestBase
Private
Shared
ReadOnly
s_defaultProvider
As
StrongNameProvider
=
SigningTestHelpers
.
s_defaultPortabl
eProvider
Private
Shared
ReadOnly
s_defaultProvider
As
StrongNameProvider
=
SigningTestHelpers
.
DefaultDesktopStrongNam
eProvider
<
Fact
>
Public
Sub
RejectIncompatibleModifiers
()
...
...
src/Test/Utilities/Portable/Platform/Custom/SigningTestHelpers.cs
浏览文件 @
3be4deda
...
...
@@ -13,15 +13,9 @@ namespace Roslyn.Test.Utilities
{
internal
static
class
SigningTestHelpers
{
// TODO: rename this to match naming conventions.
public
static
readonly
StrongNameProvider
s_defaultDesktopProvider
=
public
static
readonly
StrongNameProvider
DefaultDesktopStrongNameProvider
=
new
DesktopStrongNameProvider
(
ImmutableArray
<
string
>.
Empty
,
null
,
new
VirtualizedStrongNameFileSystem
());
public
static
readonly
StrongNameProvider
DefaultDesktopStrongNameProvider
=
s_defaultDesktopProvider
;
public
static
readonly
StrongNameProvider
s_defaultPortableProvider
=
new
PortableStrongNameProvider
(
ImmutableArray
<
string
>.
Empty
,
new
VirtualizedStrongNameFileSystem
(),
null
);
// these are virtual paths that don't exist on disk
internal
static
readonly
string
KeyFileDirectory
=
ExecutionConditionUtil
.
IsWindows
?
@"R:\__Test__\"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录