Skip to content

Commit 183a38e

Browse files
CopiloteNeRGy164
andauthored
Add comprehensive documentation for DendroDocs.Client library
* Add comprehensive documentation for DendroDocs.Client library --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: eNeRGy164 <10671831+eNeRGy164@users.noreply.github.com>
1 parent 83fd3f2 commit 183a38e

File tree

3 files changed

+172
-1
lines changed

3 files changed

+172
-1
lines changed

README.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# DendroDocs.Client
2+
3+
[![NuGet][NUGET_BADGE]][NUGET_FEED] [![Coverage Status][COVERALLS_BADGE]][COVERALLS_LINK]
4+
5+
**DendroDocs.Client** is a client library for the DendroDocs ecosystem that provides
6+
powerful extension methods for working with code analysis data.
7+
This library enables developers to manipulate and query code structure information,
8+
making it easier to work with TypeDescription, MethodDescription, InvocationDescription,
9+
and other code analysis models used in living documentation generation.
10+
11+
## Features
12+
13+
* **Type Analysis Extensions** - Query and manipulate TypeDescription collections
14+
with methods for inheritance resolution, member population, and type lookups
15+
* **Method Analysis Extensions** - Filter and analyze MethodDescription collections
16+
by name and other criteria
17+
* **Invocation Analysis Extensions** - Match method invocations, trace call consequences,
18+
and analyze method parameters
19+
* **String Utilities** - Helper methods for working with type names, generic types,
20+
and formatting for diagrams
21+
* **Attribute Extensions** - Filter and query attribute descriptions and their
22+
relationships
23+
* **Inheritance Support** - Automatically populate inherited base types and members
24+
from type hierarchies
25+
26+
## Prerequisites
27+
28+
.NET 8.0 SDK or newer.
29+
30+
## Installation
31+
32+
To use **DendroDocs.Client** in your project, install it as a NuGet package:
33+
34+
```shell
35+
dotnet add package DendroDocs.Client
36+
```
37+
38+
## Example Usage
39+
40+
```csharp
41+
using DendroDocs.Extensions;
42+
43+
// Working with type collections
44+
var types = new List<TypeDescription>();
45+
// ... populate types from analysis
46+
47+
// Find a specific type
48+
var myType = types.FirstOrDefault("MyNamespace.MyClass");
49+
50+
// Populate inherited members
51+
types.PopulateInheritedMembers();
52+
53+
// Working with method invocations
54+
var invocation = new InvocationDescription();
55+
var matchingMethods = types.GetInvokedMethod(invocation);
56+
var consequences = types.GetInvocationConsequences(invocation);
57+
58+
// String formatting utilities
59+
var typeName = "System.Collections.Generic.List<System.String>";
60+
var diagramName = typeName.ForDiagram(); // "List<String>"
61+
var isGeneric = typeName.IsGeneric(); // true
62+
var genericTypes = typeName.GenericTypes(); // ["System.String"]
63+
64+
// Method filtering
65+
var methods = new List<MethodDescription>();
66+
var namedMethods = methods.WithName("MyMethod");
67+
```
68+
69+
## The DendroDocs Ecosystem
70+
71+
**DendroDocs.Client** is a key component of the broader DendroDocs ecosystem.
72+
It works together with:
73+
74+
* [DendroDocs.Tool](https://github.com/dendrodocs/dotnet-tool) - Command-line
75+
analyzer for generating JSON from .NET projects
76+
* [DendroDocs.Shared](https://github.com/dendrodocs/dotnet-shared-lib) - Shared
77+
library with common utilities and models
78+
79+
Explore [DendroDocs](https://github.com/dendrodocs) to find more tools, libraries,
80+
and documentation resources that help you bridge the gap between your code and its
81+
documentation.
82+
83+
## Contributing
84+
85+
Contributions are welcome! Please feel free to create
86+
[issues](https://github.com/dendrodocs/dotnet-client-lib/issues) or
87+
[pull requests](https://github.com/dendrodocs/dotnet-client-lib/pulls).
88+
89+
## License
90+
91+
This project is licensed under the [MIT License](./LICENSE).
92+
93+
[NUGET_BADGE]: https://img.shields.io/nuget/v/DendroDocs.Client.svg?style=plastic
94+
[NUGET_FEED]: https://www.nuget.org/packages/DendroDocs.Client/
95+
[COVERALLS_BADGE]: https://coveralls.io/repos/github/dendrodocs/dotnet-client-lib/badge.svg?branch=main
96+
[COVERALLS_LINK]: https://coveralls.io/github/dendrodocs/dotnet-client-lib?branch=main

src/DendroDocs.Client/DendroDocs.Client.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<Authors>Michaël Hompus</Authors>
77
<PackageProjectUrl>https://github.com/DendroDocs/dotnet-client-lib</PackageProjectUrl>
8-
<Description></Description>
8+
<Description>A client library for the DendroDocs ecosystem that provides extension methods for working with code analysis data, including TypeDescription, MethodDescription, and InvocationDescription models used in living documentation generation.</Description>
99
<Copyright>Copyright Michaël Hompus 2019</Copyright>
1010
<RepositoryUrl>https://github.com/DendroDocs/dotnet-client-lib</RepositoryUrl>
1111
<RepositoryType>git</RepositoryType>

src/DendroDocs.Client/README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,77 @@
11
# DendroDocs.Client
22

3+
**DendroDocs.Client** is a client library for the DendroDocs ecosystem that provides
4+
powerful extension methods for working with code analysis data.
5+
This library enables developers to manipulate and query code structure information,
6+
making it easier to work with TypeDescription, MethodDescription, InvocationDescription,
7+
and other code analysis models used in living documentation generation.
8+
9+
## Features
10+
11+
* **Type Analysis Extensions** - Query and manipulate TypeDescription collections
12+
with methods for inheritance resolution, member population, and type lookups
13+
* **Method Analysis Extensions** - Filter and analyze MethodDescription collections
14+
by name and other criteria
15+
* **Invocation Analysis Extensions** - Match method invocations, trace call consequences,
16+
and analyze method parameters
17+
* **String Utilities** - Helper methods for working with type names, generic types,
18+
and formatting for diagrams
19+
* **Attribute Extensions** - Filter and query attribute descriptions and their
20+
relationships
21+
* **Inheritance Support** - Automatically populate inherited base types and members
22+
from type hierarchies
23+
24+
## Installation
25+
26+
To use **DendroDocs.Client** in your project, install it as a NuGet package:
27+
28+
```shell
29+
dotnet add package DendroDocs.Client
30+
```
31+
32+
## Example Usage
33+
34+
```csharp
35+
using DendroDocs.Extensions;
36+
37+
// Working with type collections
38+
var types = new List<TypeDescription>();
39+
// ... populate types from analysis
40+
41+
// Find a specific type
42+
var myType = types.FirstOrDefault("MyNamespace.MyClass");
43+
44+
// Populate inherited members
45+
types.PopulateInheritedMembers();
46+
47+
// Working with method invocations
48+
var invocation = new InvocationDescription();
49+
var matchingMethods = types.GetInvokedMethod(invocation);
50+
var consequences = types.GetInvocationConsequences(invocation);
51+
52+
// String formatting utilities
53+
var typeName = "System.Collections.Generic.List<System.String>";
54+
var diagramName = typeName.ForDiagram(); // "List<String>"
55+
var isGeneric = typeName.IsGeneric(); // true
56+
var genericTypes = typeName.GenericTypes(); // ["System.String"]
57+
58+
// Method filtering
59+
var methods = new List<MethodDescription>();
60+
var namedMethods = methods.WithName("MyMethod");
61+
```
62+
63+
## The DendroDocs Ecosystem
64+
65+
**DendroDocs.Client** is a key component of the broader DendroDocs ecosystem.
66+
It works together with DendroDocs.Tool (command-line analyzer for generating JSON
67+
from .NET projects) and DendroDocs.Shared (shared library with common utilities and
68+
models).
69+
70+
## Contributing
71+
72+
Contributions are welcome! Please feel free to create issues or pull requests at
73+
<https://github.com/dendrodocs/dotnet-client-lib>.
74+
75+
## License
76+
77+
This project is licensed under the MIT License.

0 commit comments

Comments
 (0)