diff --git a/GitHubReleaseNotes.txt b/GitHubReleaseNotes.txt
index fed7eaa..ea2c822 100644
--- a/GitHubReleaseNotes.txt
+++ b/GitHubReleaseNotes.txt
@@ -1,3 +1,3 @@
See https://github.com/StefH/GitHubReleaseNotes for more information.
-GitHubReleaseNotes.exe --output ReleaseNotes.md --skip-empty-releases --version 3.0.19
\ No newline at end of file
+GitHubReleaseNotes.exe --output ReleaseNotes.md --skip-empty-releases --version 3.0.20
\ No newline at end of file
diff --git a/ReleaseNotes.md b/ReleaseNotes.md
index 624ca66..14650cd 100644
--- a/ReleaseNotes.md
+++ b/ReleaseNotes.md
@@ -1,3 +1,10 @@
+# 3.0.20 (02 June 2019)
+- [#57](https://github.com/j-maly/CommandLineParser/pull/57) - #55 Added StrongDefaultValue for ValueArgument contributed by [eapyl](https://github.com/eapyl)
+- [#62](https://github.com/j-maly/CommandLineParser/issues/62) - getopt_long syntax
+- [#63](https://github.com/j-maly/CommandLineParser/issues/63) - CheckMandatoryArguments not being evaluated
+- [#64](https://github.com/j-maly/CommandLineParser/issues/64) - Message typo
+- [#65](https://github.com/j-maly/CommandLineParser/issues/65) - Setup Code Shown On Documentation Page Missing Needed Parentheses [Documentation]
+
# 3.0.19 (21 November 2018)
- [#61](https://github.com/j-maly/CommandLineParser/pull/61) - netstandard2.0 and added ReleaseNotes.md contributed by [StefH](https://github.com/StefH)
- [#51](https://github.com/j-maly/CommandLineParser/issues/51) - Can't override Argument.Parse in my own argument class
@@ -7,8 +14,6 @@
- [#58](https://github.com/j-maly/CommandLineParser/issues/58) - Error in the wiki - "Show Usage" section
- [#60](https://github.com/j-maly/CommandLineParser/issues/60) - Support for Folder Argument
-# 3.0.18 (13 October 2017)
-
# 3.0.15 (22 August 2017)
- [#50](https://github.com/j-maly/CommandLineParser/pull/50) - Fix for Nullable contributed by [StefH](https://github.com/StefH)
- [#48](https://github.com/j-maly/CommandLineParser/issues/48) - How is ArgumentRequiresOtherArgumentsCertification supposed to work?
@@ -23,8 +28,6 @@
- [#45](https://github.com/j-maly/CommandLineParser/issues/45) - Using AcceptAdditionalArguments=false always throws exception
- [#46](https://github.com/j-maly/CommandLineParser/issues/46) - Extend argument for supporting Guid values
-# 3.0.11 (27 May 2017)
-
# 3.0.10 (27 May 2017)
- [#43](https://github.com/j-maly/CommandLineParser/pull/43) - Parsing fails when there is equal sign (=) in argument contributed by [prog-rajkamal](https://github.com/prog-rajkamal)
- [#27](https://github.com/j-maly/CommandLineParser/issues/27) - multiple items not parsed
@@ -58,8 +61,6 @@
- [#34](https://github.com/j-maly/CommandLineParser/issues/34) - Missing docu 'multiple values with declarative syntax'
- [#35](https://github.com/j-maly/CommandLineParser/issues/35) - Regex
-# 3.0.0.2 (24 April 2016)
-
# 3.0.0.0 (21 February 2016)
- [#1](https://github.com/j-maly/CommandLineParser/pull/1) - Added support for more frameworks contributed by [StefH](https://github.com/StefH)
- [#2](https://github.com/j-maly/CommandLineParser/issues/2) - When ShowUsageOnEmptyCommandline is used, the parser does not indicate that nothing was parsed
diff --git a/src/CommandLineArgumentsParser/Arguments/IArgumentWithForceDefaultValue.cs b/src/CommandLineArgumentsParser/Arguments/IArgumentWithForceDefaultValue.cs
index b728ab2..72a320d 100644
--- a/src/CommandLineArgumentsParser/Arguments/IArgumentWithForceDefaultValue.cs
+++ b/src/CommandLineArgumentsParser/Arguments/IArgumentWithForceDefaultValue.cs
@@ -7,7 +7,7 @@ namespace CommandLineParser.Arguments
/// with the value of
/// when they do not appear on the command line.
///
- public interface IArgumentWithForceDefaultValue
+ public interface IArgumentWithForcedDefaultValue
{
///
/// Default value of the argument.
diff --git a/src/CommandLineArgumentsParser/Arguments/ValueArgument.cs b/src/CommandLineArgumentsParser/Arguments/ValueArgument.cs
index 050bcb4..5b4d9b5 100644
--- a/src/CommandLineArgumentsParser/Arguments/ValueArgument.cs
+++ b/src/CommandLineArgumentsParser/Arguments/ValueArgument.cs
@@ -1,10 +1,10 @@
+using CommandLineParser.Compatibility;
+using CommandLineParser.Exceptions;
using System;
-using System.Linq;
using System.Collections.Generic;
using System.Globalization;
+using System.Linq;
using System.Reflection;
-using CommandLineParser.Compatibility;
-using CommandLineParser.Exceptions;
namespace CommandLineParser.Arguments
{
@@ -23,7 +23,7 @@ namespace CommandLineParser.Arguments
/// Can be either builtin type or any user type (for which specific
/// conversion routine is provided -
///
- public class ValueArgument : Argument, IValueArgument, IArgumentWithDefaultValue, IArgumentWithForceDefaultValue
+ public class ValueArgument : Argument, IValueArgument, IArgumentWithDefaultValue, IArgumentWithForcedDefaultValue
{
#region property backing fields
@@ -74,16 +74,7 @@ public ValueArgument(char shortName, string longName, string description)
/// String read from command line as arguments . Available after is called.
///
/// String value was read before ParseCommandLine was called or when
- public string StringValue
- {
- get
- {
- if (Parsed)
- return _stringValue;
- else
- return null;
- }
- }
+ public string StringValue => Parsed ? _stringValue : null;
///
/// Value of the ValueArgument, for arguments with single value.
@@ -110,11 +101,11 @@ public TValue Value
///
public TValue DefaultValue { get; set; }
- public TValue StrongDefaultValue { get; set; }
+ public TValue ForcedDefaultValue { get; set; }
- object IArgumentWithDefaultValue.DefaultValue { get { return DefaultValue; } }
+ object IArgumentWithDefaultValue.DefaultValue => DefaultValue;
- object IArgumentWithForceDefaultValue.DefaultValue { get { return StrongDefaultValue; } }
+ object IArgumentWithForcedDefaultValue.DefaultValue => ForcedDefaultValue;
///
/// When set to true, argument can appear on the command line with or without value, e.g. both is allowed:
@@ -147,8 +138,8 @@ public List Values
///
object IValueArgument.Value
{
- get { return Value; }
- set { Value = (TValue)value; }
+ get => Value;
+ set => Value = (TValue)value;
}
IList
public CultureInfo CultureInfo
{
- get { return _cultureInfo; }
- set { _cultureInfo = value; }
+ get => _cultureInfo;
+ set => _cultureInfo = value;
}
///
@@ -434,7 +425,7 @@ protected virtual TValue DefaultConvert(string stringValue)
public override void Init()
{
base.Init();
- _value = StrongDefaultValue;
+ _value = ForcedDefaultValue;
_values.Clear();
_stringValue = string.Empty;
}
@@ -466,12 +457,12 @@ public override void PrintValueInfo()
/// attribute and let the CommandLineParse take care of binding the attribute to the field.
///
///
- /// Appliable to fields and properties (public).
+ /// Applicable to fields and properties (public).
/// Use for each object
/// you where you have delcared argument attributes.
public class ValueArgumentAttribute : ArgumentAttribute
{
- private static Type underlyingValueArgument;
+ private static Type _underlyingValueArgument;
///
/// Creates proper generic type for .
@@ -482,8 +473,8 @@ private static Type CreateProperValueArgumentType(Type type)
{
Type genericType = typeof(ValueArgument<>);
Type constructedType = genericType.MakeGenericType(type);
- underlyingValueArgument = constructedType;
- return underlyingValueArgument;
+ _underlyingValueArgument = constructedType;
+ return _underlyingValueArgument;
}
///
@@ -534,29 +525,17 @@ public ValueArgumentAttribute(Type type, char shortName, string longName)
///
public object DefaultValue
{
- get
- {
- return underlyingValueArgument.GetPropertyValue