Skip to content

Commit cf65c04

Browse files
KevinRansombaronfel
authored andcommitted
Use IEnumerable<string> rather than list string
1 parent 53c11b8 commit cf65c04

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

src/fsharp/DependencyManager.Integration.fs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
module internal FSharp.Compiler.DependencyManagerIntegration
55

66
open System
7+
open System.Collections.Generic
78
open System.IO
89
open System.Reflection
910
open FSharp.Compiler.DotNetFrameworkDependencies
@@ -64,8 +65,9 @@ type internal IDependencyManagerProvider =
6465
abstract Name: string
6566
abstract Key: string
6667
abstract ResolveDependencies: scriptDir: string * mainScriptName: string * scriptName: string * scriptExt: string * packageManagerTextLines: string seq * tfm: string -> bool * string list * string list
68+
6769
abstract DependencyAdding: IEvent<string * string>
68-
abstract DependencyAdded: IEvent<string * string * string list * string list * string list>
70+
abstract DependencyAdded: IEvent<string * string * IEnumerable<string> * IEnumerable<string> * IEnumerable<string>>
6971
abstract DependencyFailed: IEvent<string * string>
7072

7173
[<RequireQualifiedAccess>]
@@ -79,9 +81,9 @@ type ReflectionDependencyManagerProvider(theType: Type, nameProperty: PropertyIn
7981
let nameProperty = nameProperty.GetValue >> string
8082
let keyProperty = keyProperty.GetValue >> string
8183

82-
let dependencyAddingEvent = Event<_>()
83-
let dependencyAddedEvent = Event<_>()
84-
let dependencyFailedEvent = Event<_>()
84+
let dependencyAddingEvent = Event<string * string>()
85+
let dependencyAddedEvent = Event<string * string * IEnumerable<string> * IEnumerable<string> * IEnumerable<string>>()
86+
let dependencyFailedEvent = Event<string * string>()
8587

8688
static member InstanceMaker (theType: System.Type, outputDir: string option) =
8789
match ReflectionHelper.getAttributeNamed theType dependencyManagerAttributeName,
@@ -144,7 +146,7 @@ type ReflectionDependencyManagerProvider(theType: Type, nameProperty: PropertyIn
144146

145147
for prLine in packageManagerTextLines do
146148
if succeeded then
147-
dependencyAddedEvent.Trigger(key, prLine, references, generatedScripts, additionalIncludeFolders)
149+
dependencyAddedEvent.Trigger(key, prLine, references |> List.toSeq, generatedScripts |> List.toSeq, additionalIncludeFolders |> List.toSeq)
148150
else
149151
dependencyFailedEvent.Trigger(key, prLine)
150152

src/fsharp/DependencyManager.Integration.fsi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
/// Helper members to integrate DependencyManagers into F# codebase
44
module internal FSharp.Compiler.DependencyManagerIntegration
55

6+
open System.Collections.Generic
67
open FSharp.Compiler.Range
78

89
type IDependencyManagerProvider =
910
abstract Name: string
1011
abstract Key: string
1112
abstract ResolveDependencies: scriptDir: string * mainScriptName: string * scriptName: string * scriptExt: string * packageManagerTextLines: string seq * tfm: string -> bool * string list * string list
1213
abstract DependencyAdding: IEvent<string * string>
13-
abstract DependencyAdded: IEvent<string * string * string list * string list * string list>
14+
abstract DependencyAdded: IEvent<string * string * IEnumerable<string> * IEnumerable<string> * IEnumerable<string>>
1415
abstract DependencyFailed: IEvent<string * string>
1516

1617
[<RequireQualifiedAccess>]

src/fsharp/fsi/fsi.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ type internal FsiDynamicCompiler
959959

960960
let valueBoundEvent = Control.Event<_>()
961961
let dependencyAddingEvent = Control.Event<string * string>()
962-
let dependencyAddedEvent = Control.Event<string * string * string list * string list * string list>()
962+
let dependencyAddedEvent = Control.Event<string * string * IEnumerable<string> * IEnumerable<string> * IEnumerable<string>>()
963963
let dependencyFailedEvent = Control.Event<string * string>()
964964

965965
let mutable fragmentId = 0

src/fsharp/fsi/fsi.fsi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
module public FSharp.Compiler.Interactive.Shell
55

6+
open System.Collections.Generic
67
open System.IO
78
open System.Threading
89
open FSharp.Compiler
@@ -240,7 +241,7 @@ type FsiEvaluationSession =
240241

241242
[<CLIEvent>]
242243
/// Event fires at the successful completion of adding a dependency via the dependency manager.
243-
member DependencyAdded: IEvent<string * string * string list * string list * string list>
244+
member DependencyAdded: IEvent<string * string * IEnumerable<string> * IEnumerable<string> * IEnumerable<string>>
244245

245246
[<CLIEvent>]
246247
/// Event fires at the failure to adding a dependency via the dependency manager.

0 commit comments

Comments
 (0)