DendroDocs.Shared 0.4.0

Prefix Reserved
There is a newer version of this package available.
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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DendroDocs.Shared" Version="0.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DendroDocs.Shared" Version="0.4.0" />
                    
Directory.Packages.props
<PackageReference Include="DendroDocs.Shared" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DendroDocs.Shared --version 0.4.0
                    
#r "nuget: DendroDocs.Shared, 0.4.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DendroDocs.Shared@0.4.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DendroDocs.Shared&version=0.4.0
                    
Install as a Cake Addin
#tool nuget:?package=DendroDocs.Shared&version=0.4.0
                    
Install as a Cake Tool

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 members
  • MethodDescription: Represents methods with parameters, return types, and method body statements
  • PropertyDescription: Represents properties with getters and setters
  • FieldDescription: Represents fields and constants
  • ConstructorDescription: Represents class constructors
  • EventDescription: Represents events and event handlers
  • AttributeDescription: Represents attributes applied to code elements
  • DocumentationCommentsDescription: 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 name
  • Namespace(): Extracts the namespace from a fully qualified name
  • NamespaceParts(): 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.Json
  • SkipEmptyCollectionsContractResolver: Custom contract resolver to optimize JSON output
  • ConcreteTypeConverter: Handles polymorphic type serialization

Statement Models (DendroDocs namespace)

Represents control flow and code statements:

  • Statement: Base class for all statement types
  • If / IfElseSection: Conditional statements
  • Switch / SwitchSection: Switch statements
  • ForEach: Iteration statements
  • InvocationDescription: Method and property invocations
  • AssignmentDescription: Variable assignments
  • ReturnDescription: 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.

Version Downloads Last Updated
0.4.2 197 7/2/2025
0.4.1 134 7/2/2025
0.4.0 131 7/1/2025
0.3.2 198 6/26/2025
0.3.1 172 6/25/2025
0.3.0 200 6/4/2025
0.2.1 486 9/16/2024
0.2.0 134 9/14/2024
0.1.1 297 8/26/2024
0.1.0 135 8/26/2024