DendroDocs.Shared
0.4.0
Prefix Reserved
See the version list below for details.
dotnet add package DendroDocs.Shared --version 0.4.0
NuGet\Install-Package DendroDocs.Shared -Version 0.4.0
<PackageReference Include="DendroDocs.Shared" Version="0.4.0" />
<PackageVersion Include="DendroDocs.Shared" Version="0.4.0" />
<PackageReference Include="DendroDocs.Shared" />
paket add DendroDocs.Shared --version 0.4.0
#r "nuget: DendroDocs.Shared, 0.4.0"
#:package DendroDocs.Shared@0.4.0
#addin nuget:?package=DendroDocs.Shared&version=0.4.0
#tool nuget:?package=DendroDocs.Shared&version=0.4.0
DendroDocs.Shared
DendroDocs.Shared is a shared library used across multiple components of the DendroDocs ecosystem. It provides common utilities, abstractions, and extensions that are essential for the functionality of tools like DendroDocs.Tool and other .NET-based projects using DendroDocs.
Features
- Data Models: Comprehensive data models for representing .NET code structure including types, methods, properties, fields, and documentation comments
- Code Analysis: Tools for parsing and representing .NET code elements with support for modifiers, attributes, and inheritance
- JSON Serialization: Optimized JSON serialization utilities with custom converters for efficient data exchange
- String Extensions: Helper methods for namespace and class name manipulation
- Statement Representations: Models for control flow statements like if/else, switch, and foreach
- Documentation Parsing: XML documentation comment parsing with support for all standard tags
Installation
To use DendroDocs.Shared in your project, install it as a NuGet package:
dotnet add package DendroDocs.Shared
Example usage
using DendroDocs;
using DendroDocs.Extensions;
using DendroDocs.Json;
using Newtonsoft.Json;
// Working with type descriptions
var types = new List<TypeDescription>();
// more code
var result = JsonConvert.SerializeObject(types.OrderBy(t => t.FullName), serializerSettings);
Library Components
Data Models (DendroDocs
namespace)
The library provides comprehensive data models for representing .NET code structure:
TypeDescription
: Represents classes, interfaces, structs, enums, and delegates with their membersMethodDescription
: Represents methods with parameters, return types, and method body statementsPropertyDescription
: Represents properties with getters and settersFieldDescription
: Represents fields and constantsConstructorDescription
: Represents class constructorsEventDescription
: Represents events and event handlersAttributeDescription
: Represents attributes applied to code elementsDocumentationCommentsDescription
: Represents parsed XML documentation comments
String Extensions (DendroDocs.Extensions
namespace)
Utility methods for working with fully qualified type names:
ClassName()
: Extracts the class name from a fully qualified nameNamespace()
: Extracts the namespace from a fully qualified nameNamespaceParts()
: Splits a namespace into its component parts
JSON Utilities (DendroDocs.Json
namespace)
Optimized JSON serialization for DendroDocs data models:
JsonDefaults
: Provides pre-configured settings for both Newtonsoft.Json and System.Text.JsonSkipEmptyCollectionsContractResolver
: Custom contract resolver to optimize JSON outputConcreteTypeConverter
: Handles polymorphic type serialization
Statement Models (DendroDocs
namespace)
Represents control flow and code statements:
Statement
: Base class for all statement typesIf
/IfElseSection
: Conditional statementsSwitch
/SwitchSection
: Switch statementsForEach
: Iteration statementsInvocationDescription
: Method and property invocationsAssignmentDescription
: Variable assignmentsReturnDescription
: Return statements
The DendroDocs Ecosystem
DendroDocs.Shared is a crucial part of the broader DendroDocs ecosystem.
Explore DendroDocs to find more tools, libraries, and documentation resources that help you bridge the gap between your code and its documentation.
Contributing
Contributions are welcome! Please feel free to create issues or pull requests.
License
This project is licensed under the MIT License.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Newtonsoft.Json (>= 13.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on DendroDocs.Shared:
Package | Downloads |
---|---|
DendroDocs.Client
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. |
GitHub repositories
This package is not used by any popular GitHub repositories.