Skip to content

Commit 0d2d8ca

Browse files
committed
Use <inheritDoc /> for documentation (fixes #60)
1 parent 1021028 commit 0d2d8ca

23 files changed

+26
-320
lines changed

src/AtleX.CommandLineArguments/Help/ConsoleHelpWriter.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,7 @@ namespace AtleX.CommandLineArguments.Help
88
public abstract class ConsoleHelpWriter
99
: HelpWriter
1010
{
11-
/// <summary>
12-
/// Write the help for the specified <see cref="Arguments"/> object
13-
/// </summary>
14-
/// <typeparam name="T">
15-
/// The type of the <see cref="Arguments"/> to write the help for
16-
/// </typeparam>
17-
/// <param name="argumentsToWriteHelpFor">
18-
/// The <see cref="Arguments"/> object to write the help for
19-
/// </param>
11+
/// <inheritdoc />
2012
public override void Write<T>(T argumentsToWriteHelpFor)
2113
{
2214
_ = argumentsToWriteHelpFor ?? throw new ArgumentNullException(nameof(argumentsToWriteHelpFor));

src/AtleX.CommandLineArguments/Help/HelpWriter.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,7 @@ public HelpWriter()
1818
{
1919
}
2020

21-
/// <summary>
22-
/// Write the help for the specified <see cref="Arguments"/> object
23-
/// </summary>
24-
/// <typeparam name="T">
25-
/// The type of the <see cref="Arguments"/> to write the help for
26-
/// </typeparam>
27-
/// <param name="argumentsToWriteHelpFor">
28-
/// The <see cref="Arguments"/> object to write the help for
29-
/// </param>
21+
/// <inheritdoc />
3022
public abstract void Write<T>(T argumentsToWriteHelpFor)
3123
where T : Arguments, new();
3224

src/AtleX.CommandLineArguments/Help/KeyValueStyleHelpWriter.cs

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,7 @@ namespace AtleX.CommandLineArguments.Help
88
public class KeyValueStyleHelpWriter
99
: ConsoleHelpWriter
1010
{
11-
/// <summary>
12-
/// Write the help for the specified <see cref="Arguments"/> object
13-
/// </summary>
14-
/// <typeparam name="T">
15-
/// The type of the <see cref="Arguments"/> to write the help for
16-
/// </typeparam>
17-
/// <param name="argumentsToWriteHelpFor">
18-
/// The <see cref="Arguments"/> object to write the help for
19-
/// </param>
11+
/// <inheritdoc />
2012
public override void Write<T>(T argumentsToWriteHelpFor)
2113
{
2214
_= argumentsToWriteHelpFor ?? throw new ArgumentNullException(nameof(argumentsToWriteHelpFor));
@@ -38,17 +30,7 @@ public override void Write<T>(T argumentsToWriteHelpFor)
3830
Console.WriteLine("*: Required arguments");
3931
}
4032

41-
/// <summary>
42-
/// Gets the exact name of an argument how it should be used on the command
43-
/// line, including prefixes
44-
/// </summary>
45-
/// <param name="argumentName">
46-
/// The name of the argument to get the exact commandline usage for
47-
/// </param>
48-
/// <returns>
49-
/// The exact name of an argument how it should be used on the command line,
50-
/// including prefixes
51-
/// </returns>
33+
/// <inheritdoc />
5234
protected override string GetExactCommandlineNameOfArgument(string argumentName)
5335
{
5436
return argumentName;

src/AtleX.CommandLineArguments/Help/PrefixedKeyConsoleHelpWriter.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,7 @@ public PrefixedKeyConsoleHelpWriter(string keyPrefix)
2828
this._keyPrefix = keyPrefix;
2929
}
3030

31-
/// <summary>
32-
/// Gets the exact name of an argument how it should be used on the command
33-
/// line, including prefixes
34-
/// </summary>
35-
/// <param name="argumentName">
36-
/// The name of the argument to get the exact commandline usage for
37-
/// </param>
38-
/// <returns>
39-
/// The exact name of an argument how it should be used on the command line,
40-
/// including prefixes
41-
/// </returns>
31+
/// <inheritdoc />
4232
protected override string GetExactCommandlineNameOfArgument(string argumentName)
4333
{
4434
var result = this._keyPrefix + argumentName;

src/AtleX.CommandLineArguments/Parsers/CommandLineArgumentsParser.cs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,7 @@ public CommandLineArgumentsParser()
2121

2222
}
2323

24-
/// <summary>
25-
/// Parse the specified arguments to the specified type
26-
/// </summary>
27-
/// <typeparam name="T">
28-
/// The <see cref="Arguments"/> to parse to
29-
/// </typeparam>
30-
/// <param name="arguments">
31-
/// The arguments to parse
32-
/// </param>
33-
/// <param name="validators">
34-
/// The <see cref="IEnumerable{T}"/> of <see cref="IArgumentValidator"/> to validate the arguments with
35-
/// </param>
36-
/// <param name="typeParsers">
37-
/// The <see cref="IEnumerable{T}"/> of <see cref="ITypeParser"/> to parse the argument values with
38-
/// </param>
39-
/// <returns>
40-
/// The <see cref="ParseResult{T}"/>
41-
/// </returns>
24+
/// <inheritdoc />
4225
public virtual ParseResult<T> Parse<T>(string[] arguments, IEnumerable<IArgumentValidator> validators, IEnumerable<ITypeParser> typeParsers)
4326
where T : Arguments, new()
4427
{

src/AtleX.CommandLineArguments/Parsers/KeyValueStyleParser.cs

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,7 @@ namespace AtleX.CommandLineArguments.Parsers
88
public sealed class KeyValueStyleParser
99
: CommandLineArgumentsParser
1010
{
11-
/// <summary>
12-
/// Try to find an argument with the specified name in the specified
13-
/// collection of all command line arguments
14-
/// </summary>
15-
/// <param name="allCommandLineArguments">
16-
/// The collection of all command line arguments
17-
/// </param>
18-
/// <param name="argumentToFind">
19-
/// The name of the argument to find
20-
/// </param>
21-
/// <param name="value">
22-
/// The value of the argument, if found
23-
/// </param>
24-
/// <returns>
25-
/// True when the argument with the specified name to find is found, false otherwise
26-
/// </returns>
11+
/// <inheritdoc />
2712
protected override bool TryFindRawArgumentValue(string[] allCommandLineArguments, string argumentToFind, out string value)
2813
{
2914
var result = false;
@@ -45,15 +30,7 @@ protected override bool TryFindRawArgumentValue(string[] allCommandLineArguments
4530
return result;
4631
}
4732

48-
/// <summary>
49-
/// Gets whether the specified command line arguments contain a Help argument or not
50-
/// </summary>
51-
/// <param name="allCommandLineArguments">
52-
/// The collection of all command line arguments
53-
/// </param>
54-
/// <returns>
55-
/// True when the collection of command line arguments contains a Help argument, false otherwise
56-
/// </returns>
33+
/// <inheritdoc />
5734
protected override bool ContainsHelpArgument(string[] allCommandLineArguments)
5835
{
5936
var result = false;

src/AtleX.CommandLineArguments/Parsers/PrefixedKeyParser.cs

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,7 @@ public PrefixedKeyParser(string keyIndicator)
3434
this._keyPrefixLength = keyIndicator.Length;
3535
}
3636

37-
/// <summary>
38-
/// Try to find an argument with the specified name in the specified
39-
/// collection of all command line arguments
40-
/// </summary>
41-
/// <param name="allCommandLineArguments">
42-
/// The collection of all command line arguments
43-
/// </param>
44-
/// <param name="argumentToFind">
45-
/// The name of the argument to find
46-
/// </param>
47-
/// <param name="value">
48-
/// The value of the argument, if found
49-
/// </param>
50-
/// <returns>
51-
/// True when the argument with the specified name to find is found, false otherwise
52-
/// </returns>
37+
/// <inheritdoc />
5338
protected override bool TryFindRawArgumentValue(string[] allCommandLineArguments, string argumentToFind, out string value)
5439
{
5540
var result = false;
@@ -92,15 +77,7 @@ protected override bool TryFindRawArgumentValue(string[] allCommandLineArguments
9277
return result;
9378
}
9479

95-
/// <summary>
96-
/// Gets whether the specified command line arguments contain a Help argument or not
97-
/// </summary>
98-
/// <param name="allCommandLineArguments">
99-
/// The collection of all command line arguments
100-
/// </param>
101-
/// <returns>
102-
/// True when the collection of command line arguments contains a Help argument, false otherwise
103-
/// </returns>
80+
/// <inheritdoc />
10481
protected override bool ContainsHelpArgument(string[] allCommandLineArguments)
10582
{
10683
var completeHelpArgument = this._keyPrefix + "help";

src/AtleX.CommandLineArguments/Parsers/TypeParsers/BoolTypeParser.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,7 @@
66
internal sealed class BoolTypeParser
77
: TypeParser<bool>
88
{
9-
/// <summary>
10-
/// Tries to parse the specified value to the specified parse result
11-
/// </summary>
12-
/// <param name="value">
13-
/// The value to parse
14-
/// </param>
15-
/// <param name="parseResult">
16-
/// The parsed value
17-
/// </param>
18-
/// <returns>
19-
/// True if value was converted successfully; otherwise, false
20-
/// </returns>
9+
/// <inheritdoc />
2110
public override bool TryParse(string value, out bool parseResult)
2211
{
2312
bool result;

src/AtleX.CommandLineArguments/Parsers/TypeParsers/ByteTypeParser.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,7 @@
66
internal sealed class ByteTypeParser
77
: TypeParser<byte>
88
{
9-
/// <summary>
10-
/// Tries to parse the specified value to the specified parse result
11-
/// </summary>
12-
/// <param name="value">
13-
/// The value to parse
14-
/// </param>
15-
/// <param name="parseResult">
16-
/// The parsed value
17-
/// </param>
18-
/// <returns>
19-
/// True if value was converted successfully; otherwise, false
20-
/// </returns>
9+
/// <inheritdoc />
2110
public override bool TryParse(string value, out byte parseResult)
2211
{
2312
bool result;

src/AtleX.CommandLineArguments/Parsers/TypeParsers/CharTypeParser.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,7 @@
66
internal sealed class CharTypeParser
77
: TypeParser<char>
88
{
9-
/// <summary>
10-
/// Tries to parse the specified value to the specified parse result
11-
/// </summary>
12-
/// <param name="value">
13-
/// The value to parse
14-
/// </param>
15-
/// <param name="parseResult">
16-
/// The parsed value
17-
/// </param>
18-
/// <returns>
19-
/// True if value was converted successfully; otherwise, false
20-
/// </returns>
9+
/// <inheritdoc />
2110
public override bool TryParse(string value, out char parseResult)
2211
{
2312
var result = (!string.IsNullOrEmpty(value) && value.Length == 1);

src/AtleX.CommandLineArguments/Parsers/TypeParsers/DateTimeTypeParser.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,7 @@ namespace AtleX.CommandLineArguments.Parsers.TypeParsers
88
internal sealed class DateTimeTypeParser
99
: TypeParser<DateTime>
1010
{
11-
/// <summary>
12-
/// Tries to parse the specified value to the specified parse result
13-
/// </summary>
14-
/// <param name="value">
15-
/// The value to parse
16-
/// </param>
17-
/// <param name="parseResult">
18-
/// The parsed value
19-
/// </param>
20-
/// <returns>
21-
/// True if value was converted successfully; otherwise, false
22-
/// </returns>
11+
/// <inheritdoc />
2312
public override bool TryParse(string value, out DateTime parseResult)
2413
{
2514
bool result;

src/AtleX.CommandLineArguments/Parsers/TypeParsers/DecimalTypeParser.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,7 @@
66
internal sealed class DecimalTypeParser
77
: TypeParser<decimal>
88
{
9-
/// <summary>
10-
/// Tries to parse the specified value to the specified parse result
11-
/// </summary>
12-
/// <param name="value">
13-
/// The value to parse
14-
/// </param>
15-
/// <param name="parseResult">
16-
/// The parsed value
17-
/// </param>
18-
/// <returns>
19-
/// True if value was converted successfully; otherwise, false
20-
/// </returns>
9+
/// <inheritdoc />
2110
public override bool TryParse(string value, out decimal parseResult)
2211
{
2312
bool result;

src/AtleX.CommandLineArguments/Parsers/TypeParsers/DoubleTypeParser.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,7 @@
66
internal sealed class DoubleTypeParser
77
: TypeParser<double>
88
{
9-
/// <summary>
10-
/// Tries to parse the specified value to the specified parse result
11-
/// </summary>
12-
/// <param name="value">
13-
/// The value to parse
14-
/// </param>
15-
/// <param name="parseResult">
16-
/// The parsed value
17-
/// </param>
18-
/// <returns>
19-
/// True if value was converted successfully; otherwise, false
20-
/// </returns>
9+
/// <inheritdoc />
2110
public override bool TryParse(string value, out double parseResult)
2211
{
2312
bool result;

src/AtleX.CommandLineArguments/Parsers/TypeParsers/FloatTypeParser.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,7 @@
66
internal sealed class FloatTypeParser
77
: TypeParser<float>
88
{
9-
/// <summary>
10-
/// Tries to parse the specified value to the specified parse result
11-
/// </summary>
12-
/// <param name="value">
13-
/// The value to parse
14-
/// </param>
15-
/// <param name="parseResult">
16-
/// The parsed value
17-
/// </param>
18-
/// <returns>
19-
/// True if value was converted successfully; otherwise, false
20-
/// </returns>
9+
/// <inheritdoc />
2110
public override bool TryParse(string value, out float parseResult)
2211
{
2312
bool result;

src/AtleX.CommandLineArguments/Parsers/TypeParsers/IntTypeParser.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,7 @@
66
internal sealed class IntTypeParser
77
: TypeParser<int>
88
{
9-
/// <summary>
10-
/// Tries to parse the specified value to the specified parse result
11-
/// </summary>
12-
/// <param name="value">
13-
/// The value to parse
14-
/// </param>
15-
/// <param name="parseResult">
16-
/// The parsed value
17-
/// </param>
18-
/// <returns>
19-
/// True if value was converted successfully; otherwise, false
20-
/// </returns>
9+
/// <inheritdoc />
2110
public override bool TryParse(string value, out int parseResult)
2211
{
2312
bool result;

src/AtleX.CommandLineArguments/Parsers/TypeParsers/LongTypeParser.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,7 @@
66
internal sealed class LongTypeParser
77
: TypeParser<long>
88
{
9-
/// <summary>
10-
/// Tries to parse the specified value to the specified parse result
11-
/// </summary>
12-
/// <param name="value">
13-
/// The value to parse
14-
/// </param>
15-
/// <param name="parseResult">
16-
/// The parsed value
17-
/// </param>
18-
/// <returns>
19-
/// True if value was converted successfully; otherwise, false
20-
/// </returns>
9+
/// <inheritdoc />
2110
public override bool TryParse(string value, out long parseResult)
2211
{
2312
bool result;

src/AtleX.CommandLineArguments/Parsers/TypeParsers/ShortTypeParser.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,7 @@
66
internal sealed class ShortTypeParser
77
: TypeParser<short>
88
{
9-
/// <summary>
10-
/// Tries to parse the specified value to the specified parse result
11-
/// </summary>
12-
/// <param name="value">
13-
/// The value to parse
14-
/// </param>
15-
/// <param name="parseResult">
16-
/// The parsed value
17-
/// </param>
18-
/// <returns>
19-
/// True if value was converted successfully; otherwise, false
20-
/// </returns>
9+
/// <inheritdoc />
2110
public override bool TryParse(string value, out short parseResult)
2211
{
2312
bool result;

0 commit comments

Comments
 (0)