Skip to content

Commit b40a277

Browse files
CopiloteNeRGy164Copilot
authored
Add comprehensive XML documentation for IDE IntelliSense support (#42)
* Complete XML documentation for all public APIs Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: eNeRGy164 <10671831+eNeRGy164@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 377e733 commit b40a277

39 files changed

+797
-3
lines changed

src/DendroDocs.Shared/DendroDocs.Shared.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
<PropertyGroup>
44
<IsPackable>true</IsPackable>
5+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
56

67
<Authors>Michaël Hompus</Authors>
78
<PackageProjectUrl>https://github.com/DendroDocs/dotnet-shared-lib</PackageProjectUrl>
8-
<Description></Description>
9+
<Description>Shared library for the DendroDocs ecosystem providing common utilities, data models, and extensions for .NET code analysis and documentation generation.</Description>
910
<Copyright>Copyright Michaël Hompus 2019</Copyright>
1011
<RepositoryUrl>https://github.com/DendroDocs/dotnet-shared-lib</RepositoryUrl>
1112
<RepositoryType>git</RepositoryType>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
namespace DendroDocs;
22

3+
/// <summary>
4+
/// Represents an argument passed to a method or constructor with its type and text representation.
5+
/// </summary>
36
[DebuggerDisplay("Argument {Text} ({Type,nq})")]
47
public class ArgumentDescription(string type, string text)
58
{
9+
/// <summary>
10+
/// Gets the type of the argument.
11+
/// </summary>
612
public string Type { get; } = type ?? throw new ArgumentNullException(nameof(type));
713

14+
/// <summary>
15+
/// Gets the text representation of the argument value.
16+
/// </summary>
817
public string Text { get; } = text ?? throw new ArgumentNullException(nameof(text));
918
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
namespace DendroDocs;
22

3+
/// <summary>
4+
/// Represents an assignment statement with left-hand side, operator, and right-hand side expressions.
5+
/// </summary>
36
[DebuggerDisplay("Assignment \"{Left,nq} {Operator,nq} {Right,nq}\"")]
47
public class AssignmentDescription(string left, string @operator, string right) : Statement
58
{
9+
/// <summary>
10+
/// Gets the left-hand side expression of the assignment.
11+
/// </summary>
612
public string Left { get; } = left ?? throw new ArgumentNullException(nameof(left));
713

14+
/// <summary>
15+
/// Gets the assignment operator (e.g., "=", "+=", "-=").
16+
/// </summary>
817
public string Operator { get; } = @operator ?? throw new ArgumentNullException(nameof(@operator));
918

19+
/// <summary>
20+
/// Gets the right-hand side expression of the assignment.
21+
/// </summary>
1022
public string Right { get; } = right ?? throw new ArgumentNullException(nameof(right));
1123
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
namespace DendroDocs;
22

3+
/// <summary>
4+
/// Represents an argument passed to an attribute with its name, type, and value.
5+
/// </summary>
36
[DebuggerDisplay("AttributeArgument {Name} {Type} {Value}")]
47
public class AttributeArgumentDescription(string? name, string? type, string? value)
58
{
9+
/// <summary>
10+
/// Gets the name of the attribute argument.
11+
/// </summary>
612
public string Name { get; } = name ?? throw new ArgumentNullException("name");
713

14+
/// <summary>
15+
/// Gets the type of the attribute argument.
16+
/// </summary>
817
public string Type { get; } = type ?? throw new ArgumentNullException("type");
918

19+
/// <summary>
20+
/// Gets the value of the attribute argument.
21+
/// </summary>
1022
public string Value { get; } = value ?? throw new ArgumentNullException("value");
1123
}

src/DendroDocs.Shared/Descriptions/AttributeDescription.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,25 @@
22

33
namespace DendroDocs;
44

5+
/// <summary>
6+
/// Represents an attribute applied to a type or member with its type, name, and arguments.
7+
/// </summary>
58
[DebuggerDisplay("Attribute {Type} {Name}")]
69
public class AttributeDescription(string? type, string? name)
710
{
11+
/// <summary>
12+
/// Gets the type name of the attribute.
13+
/// </summary>
814
public string Type { get; } = type ?? throw new ArgumentNullException(nameof(type));
915

16+
/// <summary>
17+
/// Gets the name of the attribute.
18+
/// </summary>
1019
public string Name { get; } = name ?? throw new ArgumentNullException(nameof(name));
1120

21+
/// <summary>
22+
/// Gets the collection of arguments passed to the attribute.
23+
/// </summary>
1224
[Newtonsoft.Json.JsonProperty(ItemTypeNameHandling = Newtonsoft.Json.TypeNameHandling.None)]
1325
[Newtonsoft.Json.JsonConverter(typeof(ConcreteTypeConverter<List<AttributeArgumentDescription>>))]
1426
public List<AttributeArgumentDescription> Arguments { get; init; } = [];

src/DendroDocs.Shared/Descriptions/ConstructorDescription.cs

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

33
namespace DendroDocs;
44

5+
/// <summary>
6+
/// Represents a constructor with its parameters and method body statements.
7+
/// </summary>
58
[DebuggerDisplay("Constructor {Name}")]
69
public class ConstructorDescription(string name) : MemberDescription(name), IHaveAMethodBody, IJsonOnDeserialized
710
{
11+
/// <summary>
12+
/// Initializes a new instance of the <see cref="ConstructorDescription"/> class with constructor statements.
13+
/// </summary>
14+
/// <param name="name">The name of the constructor.</param>
15+
/// <param name="statements">The collection of statements in the constructor body.</param>
816
[Newtonsoft.Json.JsonConstructor]
917
[JsonConstructor]
1018
public ConstructorDescription(string name, List<Statement> statements)
@@ -13,21 +21,37 @@ public ConstructorDescription(string name, List<Statement> statements)
1321
this.Statements = statements ?? [];
1422
}
1523

24+
/// <summary>
25+
/// Gets the collection of parameter descriptions for the constructor.
26+
/// </summary>
1627
[Newtonsoft.Json.JsonProperty(ItemTypeNameHandling = Newtonsoft.Json.TypeNameHandling.None)]
1728
[Newtonsoft.Json.JsonConverter(typeof(ConcreteTypeConverter<List<ParameterDescription>>))]
1829
public List<ParameterDescription> Parameters { get; } = [];
1930

31+
/// <summary>
32+
/// Gets the collection of statements that make up the constructor body.
33+
/// </summary>
2034
public List<Statement> Statements { get; } = [];
2135

36+
/// <summary>
37+
/// Gets the member type, which is always <see cref="MemberType.Constructor"/> for constructor descriptions.
38+
/// </summary>
2239
[JsonIgnore]
2340
public override MemberType MemberType => MemberType.Constructor;
2441

42+
/// <summary>
43+
/// Called after deserialization to restore parent-child relationships between statements.
44+
/// </summary>
45+
/// <param name="context">The streaming context for deserialization.</param>
2546
[OnDeserialized]
2647
internal void OnDeserializedMethod(StreamingContext context)
2748
{
2849
this.OnDeserialized();
2950
}
3051

52+
/// <summary>
53+
/// Restores parent-child relationships between this constructor and its statements after deserialization.
54+
/// </summary>
3155
public void OnDeserialized()
3256
{
3357
foreach (var statement in this.Statements)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
11
namespace DendroDocs.DocumentationComments;
22

3+
/// <summary>
4+
/// Provides constant values for XML documentation comment attribute names.
5+
/// </summary>
36
public class Attribute
47
{
8+
/// <summary>
9+
/// The "name" attribute constant.
10+
/// </summary>
511
public const string Name = "name";
12+
/// <summary>
13+
/// The "cref" attribute constant.
14+
/// </summary>
615
public const string CRef = "cref";
16+
/// <summary>
17+
/// The "type" attribute constant.
18+
/// </summary>
719
public const string Type = "type";
20+
/// <summary>
21+
/// The "start" attribute constant.
22+
/// </summary>
823
public const string Start = "start";
924
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
namespace DendroDocs.DocumentationComments;
22

3+
/// <summary>
4+
/// Provides constant values for XML documentation comment block element names.
5+
/// </summary>
36
public class Block
47
{
8+
/// <summary>
9+
/// The "code" block element constant.
10+
/// </summary>
511
public const string Code = "code";
12+
/// <summary>
13+
/// The "list" block element constant.
14+
/// </summary>
615
public const string List = "list";
16+
/// <summary>
17+
/// The "para" block element constant.
18+
/// </summary>
719
public const string Para = "para";
820
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
11
namespace DendroDocs.DocumentationComments;
22

3+
/// <summary>
4+
/// Provides constant values for XML documentation comment inline element names.
5+
/// </summary>
36
public class Inline
47
{
8+
/// <summary>
9+
/// The "c" inline element constant for inline code.
10+
/// </summary>
511
public const string C = "c";
12+
/// <summary>
13+
/// The "paramref" inline element constant for parameter references.
14+
/// </summary>
615
public const string ParamRef = "paramref";
16+
/// <summary>
17+
/// The "typeparamref" inline element constant for type parameter references.
18+
/// </summary>
719
public const string TypeParamRef = "typeparamref";
20+
/// <summary>
21+
/// The "see" inline element constant for cross-references.
22+
/// </summary>
823
public const string See = "see";
924
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
11
namespace DendroDocs.DocumentationComments;
22

3+
/// <summary>
4+
/// Provides constant values for XML documentation comment list element names.
5+
/// </summary>
36
public class List
47
{
8+
/// <summary>
9+
/// The "item" list element constant.
10+
/// </summary>
511
public const string Item = "item";
12+
/// <summary>
13+
/// The "term" list element constant.
14+
/// </summary>
615
public const string Term = "term";
16+
/// <summary>
17+
/// The "description" list element constant.
18+
/// </summary>
719
public const string Description = "description";
20+
/// <summary>
21+
/// The "listHeader" list element constant.
22+
/// </summary>
823
public const string ListHeader = "listHeader";
924
}

0 commit comments

Comments
 (0)