Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
fsharp
提交
dd57d503
F
fsharp
项目概览
dotNET Platform
/
fsharp
10 个月 前同步成功
通知
0
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
fsharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
dd57d503
编写于
2月 10, 2020
作者:
K
Kevin Ransom
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use IEnumerable<string> rather than list string
上级
134962b0
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
16 addition
and
11 deletion
+16
-11
src/fsharp/DependencyManager.Integration.fs
src/fsharp/DependencyManager.Integration.fs
+7
-5
src/fsharp/DependencyManager.Integration.fsi
src/fsharp/DependencyManager.Integration.fsi
+2
-1
src/fsharp/fsi/fsi.fs
src/fsharp/fsi/fsi.fs
+1
-1
src/fsharp/fsi/fsi.fsi
src/fsharp/fsi/fsi.fsi
+2
-1
tests/FSharp.Compiler.Private.Scripting.UnitTests/DependencyManagerInteractiveTests.fs
....Scripting.UnitTests/DependencyManagerInteractiveTests.fs
+4
-3
未找到文件。
src/fsharp/DependencyManager.Integration.fs
浏览文件 @
dd57d503
...
...
@@ -4,6 +4,7 @@
module
internal
FSharp
.
Compiler
.
DependencyManagerIntegration
open
System
open
System
.
Collections
.
Generic
open
System
.
IO
open
System
.
Reflection
open
FSharp
.
Compiler
.
DotNetFrameworkDependencies
...
...
@@ -64,8 +65,9 @@ type internal IDependencyManagerProvider =
abstract
Name
:
string
abstract
Key
:
string
abstract
ResolveDependencies
:
scriptDir
:
string
*
mainScriptName
:
string
*
scriptName
:
string
*
scriptExt
:
string
*
packageManagerTextLines
:
string
seq
*
tfm
:
string
->
bool
*
string
list
*
string
list
abstract
DependencyAdding
:
IEvent
<
string
*
string
>
abstract
DependencyAdded
:
IEvent
<
string
*
string
*
string
list
*
string
list
*
string
list
>
abstract
DependencyAdded
:
IEvent
<
string
*
string
*
IEnumerable
<
string
>
*
IEnumerable
<
string
>
*
IEnumerable
<
string
>
>
abstract
DependencyFailed
:
IEvent
<
string
*
string
>
[<
RequireQualifiedAccess
>]
...
...
@@ -79,9 +81,9 @@ type ReflectionDependencyManagerProvider(theType: Type, nameProperty: PropertyIn
let
nameProperty
=
nameProperty
.
GetValue
>>
string
let
keyProperty
=
keyProperty
.
GetValue
>>
string
let
dependencyAddingEvent
=
Event
<
_
>()
let
dependencyAddedEvent
=
Event
<
_
>()
let
dependencyFailedEvent
=
Event
<
_
>()
let
dependencyAddingEvent
=
Event
<
string
*
string
>()
let
dependencyAddedEvent
=
Event
<
string
*
string
*
IEnumerable
<
string
>
*
IEnumerable
<
string
>
*
IEnumerable
<
string
>
>()
let
dependencyFailedEvent
=
Event
<
string
*
string
>()
static
member
InstanceMaker
(
theType
:
System
.
Type
,
outputDir
:
string
option
)
=
match
ReflectionHelper
.
getAttributeNamed
theType
dependencyManagerAttributeName
,
...
...
@@ -144,7 +146,7 @@ type ReflectionDependencyManagerProvider(theType: Type, nameProperty: PropertyIn
for
prLine
in
packageManagerTextLines
do
if
succeeded
then
dependencyAddedEvent
.
Trigger
(
key
,
prLine
,
references
,
generatedScripts
,
additionalIncludeFolders
)
dependencyAddedEvent
.
Trigger
(
key
,
prLine
,
references
|>
List
.
toSeq
,
generatedScripts
|>
List
.
toSeq
,
additionalIncludeFolders
|>
List
.
toSeq
)
else
dependencyFailedEvent
.
Trigger
(
key
,
prLine
)
...
...
src/fsharp/DependencyManager.Integration.fsi
浏览文件 @
dd57d503
...
...
@@ -3,6 +3,7 @@
/// Helper members to integrate DependencyManagers into F# codebase
module
internal
FSharp
.
Compiler
.
DependencyManagerIntegration
open
System
.
Collections
.
Generic
open
FSharp
.
Compiler
.
Range
type
IDependencyManagerProvider
=
...
...
@@ -10,7 +11,7 @@ type IDependencyManagerProvider =
abstract
Key
:
string
abstract
ResolveDependencies
:
scriptDir
:
string
*
mainScriptName
:
string
*
scriptName
:
string
*
scriptExt
:
string
*
packageManagerTextLines
:
string
seq
*
tfm
:
string
->
bool
*
string
list
*
string
list
abstract
DependencyAdding
:
IEvent
<
string
*
string
>
abstract
DependencyAdded
:
IEvent
<
string
*
string
*
string
list
*
string
list
*
string
list
>
abstract
DependencyAdded
:
IEvent
<
string
*
string
*
IEnumerable
<
string
>
*
IEnumerable
<
string
>
*
IEnumerable
<
string
>
>
abstract
DependencyFailed
:
IEvent
<
string
*
string
>
[<
RequireQualifiedAccess
>]
...
...
src/fsharp/fsi/fsi.fs
浏览文件 @
dd57d503
...
...
@@ -959,7 +959,7 @@ type internal FsiDynamicCompiler
let
valueBoundEvent
=
Control
.
Event
<_>()
let
dependencyAddingEvent
=
Control
.
Event
<
string
*
string
>()
let
dependencyAddedEvent
=
Control
.
Event
<
string
*
string
*
string
list
*
string
list
*
string
list
>()
let
dependencyAddedEvent
=
Control
.
Event
<
string
*
string
*
IEnumerable
<
string
>
*
IEnumerable
<
string
>
*
IEnumerable
<
string
>
>()
let
dependencyFailedEvent
=
Control
.
Event
<
string
*
string
>()
let
mutable
fragmentId
=
0
...
...
src/fsharp/fsi/fsi.fsi
浏览文件 @
dd57d503
...
...
@@ -3,6 +3,7 @@
module
public
FSharp
.
Compiler
.
Interactive
.
Shell
open
System
.
Collections
.
Generic
open
System
.
IO
open
System
.
Threading
open
FSharp
.
Compiler
...
...
@@ -240,7 +241,7 @@ type FsiEvaluationSession =
[<
CLIEvent
>]
/// Event fires at the successful completion of adding a dependency via the dependency manager.
member
DependencyAdded
:
IEvent
<
string
*
string
*
string
list
*
string
list
*
string
list
>
member
DependencyAdded
:
IEvent
<
string
*
string
*
IEnumerable
<
string
>
*
IEnumerable
<
string
>
*
IEnumerable
<
string
>
>
[<
CLIEvent
>]
/// Event fires at the failure to adding a dependency via the dependency manager.
...
...
tests/FSharp.Compiler.Private.Scripting.UnitTests/DependencyManagerInteractiveTests.fs
浏览文件 @
dd57d503
...
...
@@ -3,6 +3,7 @@
namespace
FSharp
.
DependencyManager
.
UnitTests
open
System
open
System
.
Collections
.
Generic
open
System
.
IO
open
FSharp
.
Compiler
.
Interactive
.
Shell
open
FSharp
.
Compiler
.
Scripting
...
...
@@ -64,10 +65,10 @@ type DependencyManagerInteractiveTests() =
dependencyAddingEventCount
<-
dependencyAddingEventCount
+
1
foundDependencyAdding
<-
foundDependencyAdding
||
(
key
=
"nuget"
&&
dependency
=
referenceText
))
script
.
DependencyAdding
Event
.
add
(
fun
(
dep
:
string
*
string
*
string
list
*
string
list
*
string
list
)
->
Event
.
add
(
fun
(
dep
:
string
*
string
*
IEnumerable
<
string
>
*
IEnumerable
<
string
>
*
IEnumerable
<
string
>
)
->
let
key
,
dependency
,
_
references
,
_
generatedScripts
,
_
packageRoots
=
dep
generatedScriptsCount
<-
_
generatedScripts
.
L
ength
packageRootsCount
<-
_
packageRoots
.
L
ength
generatedScriptsCount
<-
_
generatedScripts
|>
Seq
.
l
ength
packageRootsCount
<-
_
packageRoots
|>
Seq
.
l
ength
dependencyAddedEventCount
<-
dependencyAddedEventCount
+
1
foundDependencyAdded
<-
foundDependencyAdded
||
(
key
=
"nuget"
&&
dependency
=
referenceText
))
script
.
DependencyAdded
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录