Skip to content

DgmlReader

Namespace: Dotsider.Core.Analysis

Assembly: Dotsider.Core.dll

Reads an ILC dependency-graph DGML file, emitted when publishing a Native AOT project with IlcGenerateDgmlFile. The format is a DirectedGraph document of nodes (id and label) and links (source depends on target, with a reason). Node labels equal the node names an mstat size report stores (MstatReader), which is how sizes join to dependency chains.

Parsing streams the XML — the graphs run to hundreds of thousands of links — and never throws: unreadable files return null, and malformed nodes or links are skipped.

public static class DgmlReader

ObjectDgmlReader

Reads a dependency graph from a stream. The stream is left open.

Parameters:

  • stream (Stream): A readable stream positioned at the start of the document.

Returns: DgmlGraph

The graph, or null when the content is not a DGML document.

public static DgmlGraph? Read(Stream stream)

Reads a dependency graph from a file.

Parameters:

  • filePath (String): The path of the .dgml.xml file.

Returns: DgmlGraph

The graph, or null when the file is missing or is not a DGML document.

public static DgmlGraph? Read(string filePath)