Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,14 +411,14 @@ module Global =

type Options = { EnableLogging: bool; LogFile: FileInfo }

let options: HandlerInput seq = [ enableLogging; logFile ]
let options: ActionInput seq = [ enableLogging; logFile ]

let bind (ctx: ActionContext) =
{ EnableLogging = enableLogging.GetValue ctx.ParseResult
LogFile = logFile.GetValue ctx.ParseResult }

let listCmd =
let action (ctx: InvocationContext, dir: DirectoryInfo) =
let action (ctx: ActionContext, dir: DirectoryInfo) =
let options = Global.bind ctx
if options.EnableLogging then
printfn $"Logging enabled to {options.LogFile.FullName}"
Expand All @@ -440,7 +440,7 @@ let listCmd =
}

let deleteCmd =
let action (ctx: InvocationContext, dir: DirectoryInfo, recursive: bool) =
let action (ctx: ActionContext, dir: DirectoryInfo, recursive: bool) =
let options = Global.bind ctx
if options.EnableLogging then
printfn $"Logging enabled to {options.LogFile.FullName}"
Expand Down Expand Up @@ -471,7 +471,7 @@ let ioCmd =
}

[<EntryPoint>]
let main argv =
let main (argv: string array) =
let cfg =
commandLineConfiguration {
description "Sample app for System.CommandLine"
Expand Down