Skip to main content

Definition

Assembly: CloudNimble.DotNetDocs.Core.dll Namespace: CloudNimble.DotNetDocs.Core Inheritance: System.Object

Syntax

CloudNimble.DotNetDocs.Core.AssemblyManager

Summary

Manages assembly metadata extraction using Roslyn for API documentation generation.

Remarks

Extracts metadata from a single .NET assembly and its XML documentation file, building an in-memory model (DocAssembly) with interconnected types, members, and parameters. Supports conceptual content loading from a specified folder. Designed for multi-targeting .NET 10.0, 9.0, and 8.0. One instance per assembly is required, with paths specified at construction for incremental build support. Implements IDisposable to release memory used by the compilation and model.

Examples

using var manager = new AssemblyManager("MyLib.dll", "MyLib.xml");
var context = new ProjectContext("ref1.dll", "ref2.dll") { ConceptualPath = "conceptual" };
var model = await manager.DocumentAsync(context);

Constructors

.ctor

Initializes a new instance of AssemblyManager for a specific assembly.

Syntax

public AssemblyManager(string assemblyPath, string xmlPath)

Parameters

NameTypeDescription
assemblyPathstringPath to the assembly DLL file.
xmlPathstringPath to the XML documentation file.

Exceptions

ExceptionDescription
ArgumentNullExceptionThrown when assemblyPath or xmlPath is null.
ArgumentExceptionThrown when assemblyPath or xmlPath is empty or whitespace.
FileNotFoundExceptionThrown when assemblyPath does not exist.

Remarks

If the XML documentation file does not exist, processing will continue without XML documentation. A warning will be added to the Errors collection.

Properties

AssemblyName

Gets the name of the assembly (without extension).

Syntax

public string AssemblyName { get; init; }

Property Value

Type: string

AssemblyPath

Gets the path to the assembly DLL file.

Syntax

public string AssemblyPath { get; init; }

Property Value

Type: string

Document

Gets the current documentation model for the processed assembly.

Syntax

public CloudNimble.DotNetDocs.Core.DocAssembly Document { get; private set; }

Property Value

Type: CloudNimble.DotNetDocs.Core.DocAssembly?

Errors

Gets the collection of errors that occurred during Since processing.

Syntax

public System.Collections.Generic.List<System.CodeDom.Compiler.CompilerError> Errors { get; }

Property Value

Type: System.Collections.Generic.List<System.CodeDom.Compiler.CompilerError>

Remarks

Includes warnings about inaccessible internal members when requested but not available.

LastModified

Gets the last modified timestamp of the assembly file for incremental builds.

Syntax

public System.DateTime LastModified { get; private set; }

Property Value

Type: System.DateTime

XmlPath

Gets the path to the XML documentation file.

Syntax

public string XmlPath { get; init; }

Property Value

Type: string?

Remarks

May be null if no XML documentation file is available.

Methods

Dispose

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Syntax

public void Dispose()

DocumentAsync

Documents the assembly asynchronously, building or rebuilding an in-memory model with metadata and documentation if necessary.

Syntax

public System.Threading.Tasks.Task<CloudNimble.DotNetDocs.Core.DocAssembly> DocumentAsync(CloudNimble.DotNetDocs.Core.ProjectContext projectContext = null)

Parameters

NameTypeDescription
projectContextCloudNimble.DotNetDocs.Core.ProjectContext?Optional project context for referenced assemblies and conceptual content path.

Returns

Type: System.Threading.Tasks.Task<CloudNimble.DotNetDocs.Core.DocAssembly> A task representing the asynchronous operation, containing the DocAssembly model.
  • System.IDisposable