Skip to content

Commit

Permalink
Surface ShouldSerialize pattern on CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Ganss committed Oct 16, 2019
1 parent bb4479d commit bf045d6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion XmlSchemaClassGenerator.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ static void Main(string[] args)
var generateDescriptionAttribute = true;
var enableUpaCheck = true;
var generateComplexTypesForCollections = true;
var useShouldSerialize = false;

var options = new OptionSet {
{ "h|help", "show this message and exit", v => showHelp = v != null },
Expand Down Expand Up @@ -88,6 +89,7 @@ A file name may be given by appending a pipe sign (|) followed by a file name (l
{ "nu|noUnderscore", "do not generate underscore in private member name (default is false)", v => doNotUseUnderscoreInPrivateMemberNames = v != null },
{ "da|description", "generate DescriptionAttribute (default is true)", v => generateDescriptionAttribute = v != null },
{ "cc|complexTypesForCollections", "generate complex types for collections (default is true)", v => generateComplexTypesForCollections = v != null },
{ "s|useShouldSerialize", "use ShouldSerialize pattern instead of Specified pattern (default is false)", v => useShouldSerialize = v != null },
};

var globsAndUris = options.Parse(args);
Expand Down Expand Up @@ -152,7 +154,8 @@ A file name may be given by appending a pipe sign (|) followed by a file name (l
GenerateDescriptionAttribute = generateDescriptionAttribute,
PrivateMemberPrefix = doNotUseUnderscoreInPrivateMemberNames ? "" : "_",
EnableUpaCheck = enableUpaCheck,
GenerateComplexTypesForCollections = generateComplexTypesForCollections
GenerateComplexTypesForCollections = generateComplexTypesForCollections,
UseShouldSerializePattern = useShouldSerialize
};

if (pclCompatible)
Expand Down

0 comments on commit bf045d6

Please sign in to comment.