Skip to content

Commit 2a062ff

Browse files
authored
Merge pull request #14 from jbtule/main
Add .netstd2.0, add overload to allow sequence
2 parents f030b21 + 43f154d commit 2a062ff

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/FSharp.SystemCommandLine/CommandBuilders.fs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,14 @@ type BaseCommandBuilder<'A, 'B, 'C, 'D, 'E, 'F, 'G, 'H, 'Output>() =
125125
member this.Add(spec: CommandSpec<'Inputs, 'Output>, extraInput: HandlerInput<'Value>) =
126126
{ spec with ExtraInputs = spec.ExtraInputs @ [ extraInput ] }
127127

128+
[<CustomOperation("add")>]
129+
member this.Add(spec: CommandSpec<'Inputs, 'Output>, extraInput: HandlerInput seq) =
130+
{ spec with ExtraInputs = spec.ExtraInputs @ (extraInput |> List.ofSeq) }
131+
132+
[<CustomOperation("add")>]
133+
member this.Add(spec: CommandSpec<'Inputs, 'Output>, extraInput: HandlerInput<'Value> seq) =
134+
{ spec with ExtraInputs = spec.ExtraInputs @ (extraInput |> Seq.cast |> List.ofSeq) }
135+
128136
/// Sets general properties on the command.
129137
member this.SetGeneralProperties (spec: CommandSpec<'T, 'U>) (cmd: Command) =
130138
cmd.Description <- spec.Description

src/FSharp.SystemCommandLine/FSharp.SystemCommandLine.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
55
<GenerateDocumentationFile>true</GenerateDocumentationFile>
66
<Version>0.15.0-beta4</Version>
77
<Description>F# computation expressions for working with the System.CommandLine API.</Description>

0 commit comments

Comments
 (0)