Skip to content

Commit

Permalink
Merge pull request #89 from TeaDrivenDev/gatherunrecognizedattribute
Browse files Browse the repository at this point in the history
Add Attribute suffix to GatherUnrecognized type name
  • Loading branch information
eiriktsarpalis authored Jul 10, 2017
2 parents d2b65e8 + e2c2380 commit 2231fa0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Argu/Attributes.fs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type InheritAttribute() = inherit Attribute()
/// Denotes that the given argument should accummulate any unrecognized arguments it encounters.
/// Must contain a single field of type string
[<AttributeUsage(AttributeTargets.Property, AllowMultiple = false)>]
type GatherUnrecognized() = inherit Attribute()
type GatherUnrecognizedAttribute() = inherit Attribute()

/// Demands that at least one subcommand is specified in the CLI; a parse exception is raised otherwise.
[<AttributeUsage(AttributeTargets.Class, AllowMultiple = false)>]
Expand Down
2 changes: 1 addition & 1 deletion src/Argu/PreCompute.fs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ let rec private preComputeUnionCaseArgInfo (stack : Type list) (helpParam : Help
| None -> None

let isGatherUnrecognized =
if uci.ContainsAttribute<GatherUnrecognized>() then
if uci.ContainsAttribute<GatherUnrecognizedAttribute>() then
match types with
| _ when isMainCommand -> arguExn "parameter '%O' contains incompatible combination of attributes 'MainCommand' and 'GatherUnrecognized'." uci
| [|t|] when t = typeof<string> -> true
Expand Down

0 comments on commit 2231fa0

Please sign in to comment.