Skip to content

Commit d9597b8

Browse files
committed
added comments
1 parent ba01396 commit d9597b8

File tree

7 files changed

+45
-0
lines changed

7 files changed

+45
-0
lines changed

GoCommando/BannerAttribute.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@ namespace GoCommando
88
[AttributeUsage(AttributeTargets.Class)]
99
public class BannerAttribute : Attribute
1010
{
11+
/// <summary>
12+
/// Gets the banner text
13+
/// </summary>
1114
public string BannerText { get; }
1215

16+
/// <summary>
17+
/// Constructs the attribute
18+
/// </summary>
1319
public BannerAttribute(string bannerText)
1420
{
1521
BannerText = bannerText;

GoCommando/CommandAttribute.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@
22

33
namespace GoCommando
44
{
5+
/// <summary>
6+
/// Attribute that can be applied to a class that represents a command. The class must implement <see cref="ICommand"/>
7+
/// </summary>
58
[AttributeUsage(AttributeTargets.Class)]
69
public class CommandAttribute : Attribute
710
{
11+
/// <summary>
12+
/// Gets the name of the command
13+
/// </summary>
814
public string Command { get; }
915

16+
/// <summary>
17+
/// Constructs the attribute
18+
/// </summary>
1019
public CommandAttribute(string command)
1120
{
1221
Command = command;

GoCommando/DescriptionAttribute.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ namespace GoCommando
99
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class)]
1010
public class DescriptionAttribute : Attribute
1111
{
12+
/// <summary>
13+
/// Gets the description text
14+
/// </summary>
1215
public string DescriptionText { get; }
1316

17+
/// <summary>
18+
/// Constructs the attribute
19+
/// </summary>
1420
public DescriptionAttribute(string descriptionText)
1521
{
1622
DescriptionText = descriptionText;

GoCommando/ExampleAttribute.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@ namespace GoCommando
88
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
99
public class ExampleAttribute : Attribute
1010
{
11+
/// <summary>
12+
/// Gets the example text
13+
/// </summary>
1114
public string ExampleValue { get; }
1215

16+
/// <summary>
17+
/// Constructs the attribute
18+
/// </summary>
1319
public ExampleAttribute(string exampleValue)
1420
{
1521
ExampleValue = exampleValue;

GoCommando/ExitCodeException.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,24 @@ namespace GoCommando
99
[Serializable]
1010
public class CustomExitCodeException : Exception
1111
{
12+
/// <summary>
13+
/// Constructs the exception
14+
/// </summary>
1215
protected CustomExitCodeException(SerializationInfo info, StreamingContext context) : base(info, context)
1316
{
1417
}
1518

19+
/// <summary>
20+
/// Constructs the exception
21+
/// </summary>
1622
public CustomExitCodeException(int exitCode, string message) : base(message)
1723
{
1824
ExitCode = exitCode;
1925
}
2026

27+
/// <summary>
28+
/// Gets the exit code that the program must exit with
29+
/// </summary>
2130
public int ExitCode { get; }
2231
}
2332
}

GoCommando/GoCommandoException.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,16 @@ namespace GoCommando
1010
[Serializable]
1111
public class GoCommandoException : Exception
1212
{
13+
/// <summary>
14+
/// Constructs the exception
15+
/// </summary>
1316
protected GoCommandoException(SerializationInfo info, StreamingContext context) : base(info, context)
1417
{
1518
}
1619

20+
/// <summary>
21+
/// Constructs the exception
22+
/// </summary>
1723
public GoCommandoException(string message) : base(message)
1824
{
1925
}

GoCommando/ICommand.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
/// </summary>
66
public interface ICommand
77
{
8+
/// <summary>
9+
/// Main run method that is invoked by GoCommando
10+
/// </summary>
811
void Run();
912
}
1013
}

0 commit comments

Comments
 (0)