Interface ICodeBaseView
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:
- ICodeBase.Application, available in CQLinq through the predefined field Application.
- ICodeBase.TestCode, code elements declared in test assemblies (see IsTestCode). Application, TestCode and ThirdParty are disjoint.
- ICodeBase.ApplicationAndTestCode, the union of Application and TestCode.
- ICodeBase.ThirdParty, available in CQLinq through the predefined field ThirdParty.
- IProject.CodeQueries.ComputeJustMyCode(IGroupOfGroups, ICodeBase), available in CQLinq through the predefined field JustMyCode. The JustMyCode code base view represents code elements that are not matched by any queries prefixed with the CQLinq keyword notmycode (KindOfCodeQueryExpression.NotMyCode).
Properties (14)
Assemblies
Gets the sequence of assemblies within this code base view.
IEnumerable<IAssembly> Assemblies { get; }
Property Value
AttributeTargets
Gets the sequence of assemblies, types, methods and fields within this code base view.
IEnumerable<IAttributeTarget> AttributeTargets { get; }
Property Value
CodeBase
Gets the original ICodeBase object from which this ICodeBaseView is inferred from.
ICodeBase CodeBase { get; }
Property Value
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
CodeElementParents
Gets the sequence of assemblies, namespace and types within this code base view.
IEnumerable<ICodeElementParent> CodeElementParents { get; }
Property Value
CodeElements
Gets the sequence of all code elements (assemblies, namespace, types, methods, fields) within this code base view.
IEnumerable<ICodeElement> CodeElements { get; }
Property Value
Events
Gets the sequence of events within this code base view.
IEnumerable<IEvent> Events { get; }
Property Value
Fields
Gets the sequence of fields within this code base view.
IEnumerable<IField> Fields { get; }
Property Value
Members
Gets the sequence of methods and fields within this code base view.
IEnumerable<IMember> Members { get; }
Property Value
Methods
Gets the sequence of methods within this code base view.
IEnumerable<IMethod> Methods { get; }
Property Value
Namespaces
Gets the sequence of namespaces within this code base view.
IEnumerable<INamespace> Namespaces { get; }
Property Value
Properties
Gets the sequence of properties within this code base view.
IEnumerable<IProperty> Properties { get; }
Property Value
Types
Gets the sequence of types within this code base view.
IEnumerable<IType> Types { get; }
Property Value
TypesAndMembers
Gets the sequence of types, methods and fields within this code base view.
IEnumerable<IMember> TypesAndMembers { get; }
Property Value
Methods (2)
Contains(ICodeElement)
Gets a value indicating whether codeElement is part of this code base view.
bool Contains(ICodeElement codeElement)
Parameters
codeElementICodeElementThe code element.
Returns
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
predicatePredicate<ICodeElement>The predicate that elements in returned sub-view must satisfy.
Returns
Remarks
Internally this method is used to create codeBase.Application and codeBase.ThirdParty views.