Table of Contents

Interface ICodeBaseView

Namespace
NDepend.CodeModel
Assembly
NDepend.API.dll

Represents a total or restrained view of a ICodeBase object.

public interface ICodeBaseView
Extension Methods

Remarks

Apart the ICodeBase interface that implements ICodeBaseView, five code base views are available per default:

A custom ICodeBaseView can be created through the method ICodeBaseView.CreateSubView(Predicate<ICodeElement>).

Properties (14)

Assemblies

Gets the sequence of assemblies within this code base view.

IEnumerable<IAssembly> Assemblies { get; }

Property Value

IEnumerable<IAssembly>

AttributeTargets

Gets the sequence of assemblies, types, methods and fields within this code base view.

IEnumerable<IAttributeTarget> AttributeTargets { get; }

Property Value

IEnumerable<IAttributeTarget>

CodeBase

Gets the original ICodeBase object from which this ICodeBaseView is inferred from.

ICodeBase CodeBase { get; }

Property Value

ICodeBase

CodeContainers

Gets the sequence of all code elements that contains executable code (assemblies, namespace, types, methods) within this code base view.

IEnumerable<ICodeContainer> CodeContainers { get; }

Property Value

IEnumerable<ICodeContainer>

CodeElementParents

Gets the sequence of assemblies, namespace and types within this code base view.

IEnumerable<ICodeElementParent> CodeElementParents { get; }

Property Value

IEnumerable<ICodeElementParent>

CodeElements

Gets the sequence of all code elements (assemblies, namespace, types, methods, fields) within this code base view.

IEnumerable<ICodeElement> CodeElements { get; }

Property Value

IEnumerable<ICodeElement>

Events

Gets the sequence of events within this code base view.

IEnumerable<IEvent> Events { get; }

Property Value

IEnumerable<IEvent>

Fields

Gets the sequence of fields within this code base view.

IEnumerable<IField> Fields { get; }

Property Value

IEnumerable<IField>

Members

Gets the sequence of methods and fields within this code base view.

IEnumerable<IMember> Members { get; }

Property Value

IEnumerable<IMember>

Methods

Gets the sequence of methods within this code base view.

IEnumerable<IMethod> Methods { get; }

Property Value

IEnumerable<IMethod>

Namespaces

Gets the sequence of namespaces within this code base view.

IEnumerable<INamespace> Namespaces { get; }

Property Value

IEnumerable<INamespace>

Properties

Gets the sequence of properties within this code base view.

IEnumerable<IProperty> Properties { get; }

Property Value

IEnumerable<IProperty>

Types

Gets the sequence of types within this code base view.

IEnumerable<IType> Types { get; }

Property Value

IEnumerable<IType>

TypesAndMembers

Gets the sequence of types, methods and fields within this code base view.

IEnumerable<IMember> TypesAndMembers { get; }

Property Value

IEnumerable<IMember>

Methods (2)

Contains(ICodeElement)

Gets a value indicating whether codeElement is part of this code base view.

bool Contains(ICodeElement codeElement)

Parameters

codeElement ICodeElement

The code element.

Returns

bool

Remarks

This method has a constant time complexity.

CreateSubView(Predicate<ICodeElement>)

Creates a sub-view object, containing only this view code elements for which predicate returns true;

ICodeBaseView CreateSubView(Predicate<ICodeElement> predicate)

Parameters

predicate Predicate<ICodeElement>

The predicate that elements in returned sub-view must satisfy.

Returns

ICodeBaseView

Remarks

Internally this method is used to create codeBase.Application and codeBase.ThirdParty views.