namespace ConsumePlugin open System open System.IO open WoofWare.Myriad.Plugins [] type BasicNoPositionals = { Foo : int Bar : string Baz : bool Rest : int list } [] type Basic = { [] Foo : int Bar : string Baz : bool [] [] Rest : string list } [] type BasicWithIntPositionals = { Foo : int Bar : string Baz : bool [] Rest : int list } [] type LoadsOfTypes = { Foo : int Bar : string Baz : bool SomeFile : FileInfo SomeDirectory : DirectoryInfo SomeList : DirectoryInfo list OptionalThingWithNoDefault : int option [] Positionals : int list [] OptionalThing : Choice [] AnotherOptionalThing : Choice [] YetAnotherOptionalThing : Choice } static member DefaultOptionalThing () = true static member DefaultAnotherOptionalThing () = 3 [] type LoadsOfTypesNoPositionals = { Foo : int Bar : string Baz : bool SomeFile : FileInfo SomeDirectory : DirectoryInfo SomeList : DirectoryInfo list OptionalThingWithNoDefault : int option [] OptionalThing : Choice [] AnotherOptionalThing : Choice [] YetAnotherOptionalThing : Choice } static member DefaultOptionalThing () = false static member DefaultAnotherOptionalThing () = 3 [] type DatesAndTimes = { Plain : TimeSpan [] Invariant : TimeSpan [] [] Exact : TimeSpan [] InvariantExact : TimeSpan } type ChildRecord = { Thing1 : int Thing2 : string } [] type ParentRecord = { Child : ChildRecord AndAnother : bool } type ChildRecordWithPositional = { Thing1 : int [] Thing2 : Uri list } [] type ParentRecordChildPos = { Child : ChildRecordWithPositional AndAnother : bool } [] type ParentRecordSelfPos = { Child : ChildRecord [] AndAnother : bool list } [] type ChoicePositionals = { [] Args : Choice list } [] type ContainsBoolEnvVar = { [] BoolVar : Choice } [] module Consts = [] let FALSE = false [] let TRUE = true type DryRunMode = | [] Wet | [] Dry [] type WithFlagDu = { DryRun : DryRunMode } [] type ContainsFlagEnvVar = { // This phrasing is odd, but it's for a test. Nobody's really going to have `--dry-run` // controlled by an env var! [] DryRun : Choice } [] type ContainsFlagDefaultValue = { [] DryRun : Choice } static member DefaultDryRun () = DryRunMode.Wet [] type ManyLongForms = { [] [] DoTheThing : string [] [] SomeFlag : bool } [] type private IrrelevantDu = | Foo | Bar