Table of Contents

Class ExtensionMethodsDiagram

Namespace
NDepend.CodeModel
Assembly
NDepend.API.dll

Provides a set of extension methods to export code model graph and matrix diagrams.

public static class ExtensionMethodsDiagram
Inheritance
ExtensionMethodsDiagram
Inherited Members

Methods (4)

TryExportSvgGraphCallersCallees(IEnumerable<ICodeElement>, DependencyDirection, uint, IAbsoluteFilePath, ExportGraphSettings, out string)

Exports a callers/callees dependency diagram as an SVG file for the specified code elements.

public static bool TryExportSvgGraphCallersCallees(this IEnumerable<ICodeElement> codeElements, DependencyDirection dependencyDirection, uint callDepth, IAbsoluteFilePath filePath, ExportGraphSettings settings, out string failureReason)

Parameters

codeElements IEnumerable<ICodeElement>

The code elements to use as the starting points for the dependency graph.

dependencyDirection DependencyDirection

The direction of dependencies to include (callers, callees, both, or none).

callDepth uint

The maximum callDepth to traverse in the dependency graph. Must be one for direct call, or greater for indirect call.

filePath IAbsoluteFilePath

The absolute file path where the SVG file will be saved.

settings ExportGraphSettings

The export graph settings.

failureReason string

When this method returns false, contains a description of the failure reason; otherwise, null.

Returns

bool

true if the SVG diagram was successfully exported; otherwise, false.

Remarks

This method generates a visual representation of the callers/callees relationships for the specified code elements and saves it as an SVG file.

TryExportSvgGraphCodeMap(ICodeBase, IAbsoluteFilePath, out string)

Exports a code map diagram of the given ICodeBase as an SVG file.

public static bool TryExportSvgGraphCodeMap(this ICodeBase codeBase, IAbsoluteFilePath filePath, out string failureReason)

Parameters

codeBase ICodeBase

The code base to export the code map from.

filePath IAbsoluteFilePath

The absolute file path where the SVG file will be saved.

failureReason string

When this method returns false, contains a description of the failure reason; otherwise, null.

Returns

bool

true if the SVG code map was successfully exported; otherwise, false.

Remarks

This method generates a visual representation of the code base structure and saves it as an SVG file.

TryExportSvgGraphFocusOnNode(ICodeElement, IAbsoluteFilePath, ExportGraphSettings, out string)

Exports a code map diagram focused on the specified ICodeElement as an SVG file.

public static bool TryExportSvgGraphFocusOnNode(this ICodeElement codeElement, IAbsoluteFilePath filePath, ExportGraphSettings settings, out string failureReason)

Parameters

codeElement ICodeElement

The code element to focus on in the exported code map.

filePath IAbsoluteFilePath

The absolute file path where the SVG file will be saved.

settings ExportGraphSettings

The export graph settings.

failureReason string

When this method returns false, contains a description of the failure reason; otherwise, null.

Returns

bool

true if the SVG code map was successfully exported; otherwise, false.

Remarks

This method generates a visual representation of the code base structure, focusing on the specified code element, and saves it as an SVG file.

TryExportSvgGraphQueryResult(ICodeBase, IEnumerable<ICodeElement>, string, IAbsoluteFilePath, ExportGraphSettings, out string)

Exports the graph made of code elements matched by the code query as an SVG file.

public static bool TryExportSvgGraphQueryResult(this ICodeBase codeBase, IEnumerable<ICodeElement> codeElementsSelected, string queryString, IAbsoluteFilePath filePath, ExportGraphSettings settings, out string failureReason)

Parameters

codeBase ICodeBase

The code base.

codeElementsSelected IEnumerable<ICodeElement>

The code elements to mark as selected in the dependency graph.

queryString string

The code query string.

filePath IAbsoluteFilePath

The absolute file path where the SVG file will be saved.

settings ExportGraphSettings

The export graph settings.

failureReason string

When this method returns false, contains a description of the failure reason; otherwise, null.

Returns

bool

true if the SVG diagram was successfully exported; otherwise, false.