Table of Contents

Class ExtensionMethodsProjection

Namespace
NDepend.CodeModel
Assembly
NDepend.API.dll

Provides a set of extension methods to realize projection of a sequence of code elements to a sequence of children or parents code elements.

public static class ExtensionMethodsProjection
Inheritance
ExtensionMethodsProjection
Inherited Members

Remarks

All output sequences contain distinct code elements objects, even upon input sequence containing doublons code elements objects.
Sequences returned are ordered this way: all assemblies objects first (if any), then all namespaces objects (if any), then all types objects (if any), then all methods objects (if any), then all fields objects (if any).
Some OrderByHierarchy() and OrderByName() extension methods are also provided by this class to order result sequence differently if needed.

Methods (94)

ChildEvents(IEnumerable<IAssembly>)

Returns a sequence of IEvent objects, containing all ChildEvents objects of all IAssembly objects contained in this sequence assemblies.

public static IEnumerable<IEvent> ChildEvents(this IEnumerable<IAssembly> assemblies)

Parameters

assemblies IEnumerable<IAssembly>

This sequence of IAssembly objects.

Returns

IEnumerable<IEvent>

ChildEvents(IEnumerable<INamespace>)

Returns a sequence of IEvent objects, containing all ChildEvents objects of all INamespace objects contained in this sequence namespaces.

public static IEnumerable<IEvent> ChildEvents(this IEnumerable<INamespace> namespaces)

Parameters

namespaces IEnumerable<INamespace>

This sequence of INamespace objects.

Returns

IEnumerable<IEvent>

ChildEvents(IEnumerable<IType>)

Returns a sequence of IEvent objects, containing all ChildEvents objects of all IType objects contained in this sequence types.

public static IEnumerable<IEvent> ChildEvents(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IType objects.

Returns

IEnumerable<IEvent>

ChildFields(IEnumerable<IAssembly>)

Returns a sequence of IField objects, containing all ChildFields objects of all IAssembly objects contained in this sequence assemblies.

public static IEnumerable<IField> ChildFields(this IEnumerable<IAssembly> assemblies)

Parameters

assemblies IEnumerable<IAssembly>

This sequence of IAssembly objects.

Returns

IEnumerable<IField>

ChildFields(IEnumerable<INamespace>)

Returns a sequence of IField objects, containing all ChildFields objects of all INamespace objects contained in this sequence namespaces.

public static IEnumerable<IField> ChildFields(this IEnumerable<INamespace> namespaces)

Parameters

namespaces IEnumerable<INamespace>

This sequence of INamespace objects.

Returns

IEnumerable<IField>

ChildFields(IEnumerable<IType>)

Returns a sequence of IField objects, containing all Fields objects of all IType objects contained in this sequence types.

public static IEnumerable<IField> ChildFields(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IField objects.

Returns

IEnumerable<IField>

ChildMembers(IEnumerable<IAssembly>)

Returns a sequence of IMember objects, containing all ChildMembers objects of all IAssembly objects contained in this sequence assemblies.

public static IEnumerable<IMember> ChildMembers(this IEnumerable<IAssembly> assemblies)

Parameters

assemblies IEnumerable<IAssembly>

This sequence of IAssembly objects.

Returns

IEnumerable<IMember>

ChildMembers(IEnumerable<INamespace>)

Returns a sequence of IMember objects, containing all ChildMembers objects of all INamespace objects contained in this sequence namespaces.

public static IEnumerable<IMember> ChildMembers(this IEnumerable<INamespace> namespaces)

Parameters

namespaces IEnumerable<INamespace>

This sequence of INamespace objects.

Returns

IEnumerable<IMember>

ChildMembers(IEnumerable<IType>)

Returns a sequence of IMember objects, containing all ChildMembers objects of all IType objects contained in this sequence types.

public static IEnumerable<IMember> ChildMembers(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IType objects.

Returns

IEnumerable<IMember>

ChildMethods(IEnumerable<IAssembly>)

Returns a sequence of IMethod objects, containing all ChildMethods objects of all IAssembly objects contained in this sequence assemblies.

public static IEnumerable<IMethod> ChildMethods(this IEnumerable<IAssembly> assemblies)

Parameters

assemblies IEnumerable<IAssembly>

This sequence of IAssembly objects.

Returns

IEnumerable<IMethod>

ChildMethods(IEnumerable<INamespace>)

Returns a sequence of IMethod objects, containing all ChildMethods objects of all INamespace objects contained in this sequence namespaces.

public static IEnumerable<IMethod> ChildMethods(this IEnumerable<INamespace> namespaces)

Parameters

namespaces IEnumerable<INamespace>

This sequence of INamespace objects.

Returns

IEnumerable<IMethod>

ChildMethods(IEnumerable<IType>)

Returns a sequence of IMethod objects, containing all MethodsAndConstructors objects of all IType objects contained in this sequence types.

public static IEnumerable<IMethod> ChildMethods(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IType objects.

Returns

IEnumerable<IMethod>

ChildNamespaces(IEnumerable<IAssembly>)

Returns a sequence of INamespace objects, containing all ChildNamespaces objects child of all IAssembly objects contained in this sequence assemblies.

public static IEnumerable<INamespace> ChildNamespaces(this IEnumerable<IAssembly> assemblies)

Parameters

assemblies IEnumerable<IAssembly>

This sequence of IAssembly objects.

Returns

IEnumerable<INamespace>

ChildNamespacesAndTypes(IEnumerable<IAssembly>)

Returns a sequence of ICodeElementParent objects, containing all ChildNamespaces and ChildTypes objects of all IAssembly objects contained in this sequence assemblies.

public static IEnumerable<ICodeElementParent> ChildNamespacesAndTypes(this IEnumerable<IAssembly> assemblies)

Parameters

assemblies IEnumerable<IAssembly>

This sequence of IAssembly objects.

Returns

IEnumerable<ICodeElementParent>

ChildNamespacesTypesAndMembers(IEnumerable<IAssembly>)

Returns a sequence of ICodeElementParent objects, containing all ChildNamespaces and ChildTypesAndMembers objects of all IAssembly objects contained in this sequence assemblies.

public static IEnumerable<ICodeElement> ChildNamespacesTypesAndMembers(this IEnumerable<IAssembly> assemblies)

Parameters

assemblies IEnumerable<IAssembly>

This sequence of IAssembly objects.

Returns

IEnumerable<ICodeElement>

ChildProperties(IEnumerable<IAssembly>)

Returns a sequence of IProperty objects, containing all ChildProperties objects of all IAssembly objects contained in this sequence assemblies.

public static IEnumerable<IProperty> ChildProperties(this IEnumerable<IAssembly> assemblies)

Parameters

assemblies IEnumerable<IAssembly>

This sequence of IAssembly objects.

Returns

IEnumerable<IProperty>

ChildProperties(IEnumerable<INamespace>)

Returns a sequence of IProperty objects, containing all ChildProperties objects of all INamespace objects contained in this sequence namespaces.

public static IEnumerable<IProperty> ChildProperties(this IEnumerable<INamespace> namespaces)

Parameters

namespaces IEnumerable<INamespace>

This sequence of INamespace objects.

Returns

IEnumerable<IProperty>

ChildProperties(IEnumerable<IType>)

Returns a sequence of IProperty objects, containing all ChildProperties objects of all IType objects contained in this sequence types.

public static IEnumerable<IProperty> ChildProperties(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IType objects.

Returns

IEnumerable<IProperty>

ChildTypes(IEnumerable<IAssembly>)

Returns a sequence of IType objects, containing all ChildTypes objects of all IAssembly objects contained in this sequence assemblies.

public static IEnumerable<IType> ChildTypes(this IEnumerable<IAssembly> assemblies)

Parameters

assemblies IEnumerable<IAssembly>

This sequence of IAssembly objects.

Returns

IEnumerable<IType>

ChildTypes(IEnumerable<INamespace>)

Returns a sequence of IType objects, containing all ChildTypes objects of all INamespace objects contained in this sequence namespaces.

public static IEnumerable<IType> ChildTypes(this IEnumerable<INamespace> namespaces)

Parameters

namespaces IEnumerable<INamespace>

This sequence of INamespace objects.

Returns

IEnumerable<IType>

ChildTypesAndMembers(IEnumerable<IAssembly>)

Returns a sequence of IMember objects, containing all ChildTypesAndMembers objects of all IAssembly objects contained in this sequence assemblies.

public static IEnumerable<IMember> ChildTypesAndMembers(this IEnumerable<IAssembly> assemblies)

Parameters

assemblies IEnumerable<IAssembly>

This sequence of IAssembly objects.

Returns

IEnumerable<IMember>

ChildTypesAndMembers(IEnumerable<INamespace>)

Returns a sequence of IMember objects, containing all ChildTypesAndMembers objects of all INamespace objects contained in this sequence namespaces.

public static IEnumerable<IMember> ChildTypesAndMembers(this IEnumerable<INamespace> namespaces)

Parameters

namespaces IEnumerable<INamespace>

This sequence of INamespace objects.

Returns

IEnumerable<IMember>

NestedTypes(IEnumerable<IType>)

Returns a sequence of IType objects, containing all types nested in types of the sequence types.

public static IEnumerable<IType> NestedTypes(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IType objects.

Returns

IEnumerable<IType>

Remarks

If a type has a nested type that has a nested type, both nested types are returned.
Notice that for third-party nested types, the property IType.IsNested is set to true, but the parent/nested relation represented by IType.NestedTypes and IMember.ParentType is not resolved. Hence this extension method only works for application types, not for third-party types.

See Also

OrderByHierarchy(IEnumerable<IAttributeTarget>)

Returns a sequence that contain these attributeTargets ordered by hierarchy. For example an assembly of attributeTargets is followed by its first child type in sequence, that is followed by its first child method in the sequence...

public static IEnumerable<IAttributeTarget> OrderByHierarchy(this IEnumerable<IAttributeTarget> attributeTargets)

Parameters

attributeTargets IEnumerable<IAttributeTarget>

This sequence of IAttributeTarget objects.

Returns

IEnumerable<IAttributeTarget>

Remarks

An IAssembly object, is followed by its child IType objects.
A IType object, is followed by its child IMethod and IField objects.
A IType object, is also followed by its nested ITypeobjects.

OrderByHierarchy(IEnumerable<ICodeContainer>)

Returns a sequence that contain these codeContainers ordered by hierarchy. For example an assembly of codeContainers is followed by its first child namespace in sequence, that is followed by its first child type in the sequence...

public static IEnumerable<ICodeContainer> OrderByHierarchy(this IEnumerable<ICodeContainer> codeContainers)

Parameters

codeContainers IEnumerable<ICodeContainer>

This sequence of ICodeContainer objects.

Returns

IEnumerable<ICodeContainer>

Remarks

An IAssembly object, is followed by its child INamespace objects.
A INamespace object, is followed by its child IType objects.
A IType object, is followed by its child IMethod objects.
A IType object, is also followed by its nested ITypeobjects.

OrderByHierarchy(IEnumerable<ICodeElementParent>)

Returns a sequence that contain these codeElementParents ordered by hierarchy. For example an assembly of codeElementParents is followed by its first child namespace in sequence, that is followed by its first child type in the sequence...

public static IEnumerable<ICodeElementParent> OrderByHierarchy(this IEnumerable<ICodeElementParent> codeElementParents)

Parameters

codeElementParents IEnumerable<ICodeElementParent>

This sequence of ICodeElementParent objects.

Returns

IEnumerable<ICodeElementParent>

Remarks

An IAssembly object, is followed by its child INamespace objects.
A INamespace object, is followed by its child IType objects.
A IType object, is also followed by its nested ITypeobjects.

OrderByHierarchy(IEnumerable<ICodeElement>)

Returns a sequence that contain these codeElements ordered by hierarchy. For example an assembly of codeElements is followed by its first child namespace in sequence, that is followed by its first child type in the sequence...

public static IEnumerable<ICodeElement> OrderByHierarchy(this IEnumerable<ICodeElement> codeElements)

Parameters

codeElements IEnumerable<ICodeElement>

This sequence of ICodeElement objects.

Returns

IEnumerable<ICodeElement>

Remarks

An IAssembly object, is followed by its child INamespace objects.
A INamespace object, is followed by its child IType objects.
A IType object, is followed by its child IMethod and IField objects.
A IType object, is also followed by its nested ITypeobjects.

OrderByHierarchy(IEnumerable<IMember>)

Returns a sequence that contain these members ordered by hierarchy. For example a type of members is followed by its first child method in sequence, that is followed by its second child method in the sequence...

public static IEnumerable<IMember> OrderByHierarchy(this IEnumerable<IMember> members)

Parameters

members IEnumerable<IMember>

This sequence of IMember objects.

Returns

IEnumerable<IMember>

Remarks

A IType object, is followed by its child IMethod and IField objects.
A IType object, is also followed by its nested ITypeobjects.

ParentAssemblies(IEnumerable<IField>)

Returns a sequence of IAssembly objects, containing all ParentAssembly objects of all IField objects contained in this sequence fields.

public static IEnumerable<IAssembly> ParentAssemblies(this IEnumerable<IField> fields)

Parameters

fields IEnumerable<IField>

This sequence of IField objects.

Returns

IEnumerable<IAssembly>

ParentAssemblies(IEnumerable<IMember>)

Returns a sequence of IAssembly objects, containing all ParentAssembly objects of all IMember objects contained in this sequence members.

public static IEnumerable<IAssembly> ParentAssemblies(this IEnumerable<IMember> members)

Parameters

members IEnumerable<IMember>

This sequence of IMember objects.

Returns

IEnumerable<IAssembly>

ParentAssemblies(IEnumerable<IMethod>)

Returns a sequence of IAssembly objects, containing all ParentAssembly objects of all IMethod objects contained in this sequence methods.

public static IEnumerable<IAssembly> ParentAssemblies(this IEnumerable<IMethod> methods)

Parameters

methods IEnumerable<IMethod>

This sequence of IMethod objects.

Returns

IEnumerable<IAssembly>

ParentAssemblies(IEnumerable<INamespace>)

Returns a sequence of IAssembly objects, containing all ParentAssembly objects of all INamespace objects contained in this sequence namespaces.

public static IEnumerable<IAssembly> ParentAssemblies(this IEnumerable<INamespace> namespaces)

Parameters

namespaces IEnumerable<INamespace>

This sequence of INamespace objects.

Returns

IEnumerable<IAssembly>

ParentAssemblies(IEnumerable<IType>)

Returns a sequence of IAssembly objects, containing all ParentAssembly objects of all IType objects contained in this sequence types.

public static IEnumerable<IAssembly> ParentAssemblies(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IType objects.

Returns

IEnumerable<IAssembly>

ParentAssembliesAndNamespaces(IEnumerable<IField>)

Returns a sequence of ICodeElementParent objects, containing all ParentAssembly and ParentNamespace objects of all IMethod objects contained in this sequence fields.

public static IEnumerable<ICodeElementParent> ParentAssembliesAndNamespaces(this IEnumerable<IField> fields)

Parameters

fields IEnumerable<IField>

This sequence of IField objects.

Returns

IEnumerable<ICodeElementParent>

ParentAssembliesAndNamespaces(IEnumerable<IMember>)

Returns a sequence of ICodeElementParent objects, containing all ParentAssembly and ParentNamespace objects of all IMember objects contained in this sequence members.

public static IEnumerable<ICodeElementParent> ParentAssembliesAndNamespaces(this IEnumerable<IMember> members)

Parameters

members IEnumerable<IMember>

This sequence of IMember objects.

Returns

IEnumerable<ICodeElementParent>

ParentAssembliesAndNamespaces(IEnumerable<IMethod>)

Returns a sequence of ICodeElementParent objects, containing all ParentAssembly and ParentNamespace objects of all IMethod objects contained in this sequence methods.

public static IEnumerable<ICodeElementParent> ParentAssembliesAndNamespaces(this IEnumerable<IMethod> methods)

Parameters

methods IEnumerable<IMethod>

This sequence of IMethod objects.

Returns

IEnumerable<ICodeElementParent>

ParentAssembliesAndNamespaces(IEnumerable<IType>)

Returns a sequence of ICodeElementParent objects, containing all ParentAssembly and ParentNamespace objects of all IType objects contained in this sequence types.

public static IEnumerable<ICodeElementParent> ParentAssembliesAndNamespaces(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IType objects.

Returns

IEnumerable<ICodeElementParent>

ParentAssembliesNamespacesAndTypes(IEnumerable<IField>)

Returns a sequence of ICodeElementParent objects, containing all ParentAssembly, ParentNamespace and ParentType objects of all IField objects contained in this sequence fields.

public static IEnumerable<ICodeElementParent> ParentAssembliesNamespacesAndTypes(this IEnumerable<IField> fields)

Parameters

fields IEnumerable<IField>

This sequence of IField objects.

Returns

IEnumerable<ICodeElementParent>

ParentAssembliesNamespacesAndTypes(IEnumerable<IMember>)

Returns a sequence of ICodeElementParent objects, containing all ParentAssembly, ParentNamespace and ParentType objects of all IMember objects contained in this sequence members.

public static IEnumerable<ICodeElementParent> ParentAssembliesNamespacesAndTypes(this IEnumerable<IMember> members)

Parameters

members IEnumerable<IMember>

This sequence of IMember objects.

Returns

IEnumerable<ICodeElementParent>

Remarks

For a IType object in the sequence members, a parent type is added to the result sequence only if it is a nested type.
If such a type is nested in a nested type all its parents types are added to the result sequence.

If the parent type of a nested type is already in the sequence members, it is not added a second time because all sequences returned by projection methods are doublon-free.

ParentAssembliesNamespacesAndTypes(IEnumerable<IMethod>)

Returns a sequence of ICodeElementParent objects, containing all ParentAssembly, ParentNamespace and ParentType objects of all IMethod objects contained in this sequence methods.

public static IEnumerable<ICodeElementParent> ParentAssembliesNamespacesAndTypes(this IEnumerable<IMethod> methods)

Parameters

methods IEnumerable<IMethod>

This sequence of IMethod objects.

Returns

IEnumerable<ICodeElementParent>

ParentNamespaces(IEnumerable<IField>)

Returns a sequence of INamespace objects, containing all ParentNamespace objects of all IField objects contained in this sequence fields.

public static IEnumerable<INamespace> ParentNamespaces(this IEnumerable<IField> fields)

Parameters

fields IEnumerable<IField>

This sequence of IField objects.

Returns

IEnumerable<INamespace>

ParentNamespaces(IEnumerable<IMember>)

Returns a sequence of INamespace objects, containing all ParentNamespace objects of all IMember objects contained in this sequence members.

public static IEnumerable<INamespace> ParentNamespaces(this IEnumerable<IMember> members)

Parameters

members IEnumerable<IMember>

This sequence of IMember objects.

Returns

IEnumerable<INamespace>

ParentNamespaces(IEnumerable<IMethod>)

Returns a sequence of INamespace objects, containing all ParentNamespace objects of all IMethod objects contained in this sequence methods.

public static IEnumerable<INamespace> ParentNamespaces(this IEnumerable<IMethod> methods)

Parameters

methods IEnumerable<IMethod>

This sequence of IMethod objects.

Returns

IEnumerable<INamespace>

ParentNamespaces(IEnumerable<IType>)

Returns a sequence of INamespace objects, containing all ParentNamespace objects of all IType objects contained in this sequence types.

public static IEnumerable<INamespace> ParentNamespaces(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IType objects.

Returns

IEnumerable<INamespace>

ParentTypes(IEnumerable<IField>)

Returns a sequence of IType objects, containing all ParentType objects of all IField objects contained in this sequence fields.

public static IEnumerable<IType> ParentTypes(this IEnumerable<IField> fields)

Parameters

fields IEnumerable<IField>

This sequence of IField objects.

Returns

IEnumerable<IType>

ParentTypes(IEnumerable<IMember>)

Returns a sequence of IType objects, containing all ParentType objects of all IMember objects contained in this sequence members.

public static IEnumerable<IType> ParentTypes(this IEnumerable<IMember> members)

Parameters

members IEnumerable<IMember>

This sequence of IMember objects.

Returns

IEnumerable<IType>

Remarks

For a IType object in the sequence members, a parent type is added to the result sequence only if it is a nested type.
If such a type is nested in a nested type all its parents types are added to the result sequence.

If the parent type of a nested type is already in the sequence members, it is not added a second time because all sequences returned by projection methods are doublon-free.

ParentTypes(IEnumerable<IMethod>)

Returns a sequence of IType objects, containing all ParentType objects of all IMethod objects contained in this sequence methods.

public static IEnumerable<IType> ParentTypes(this IEnumerable<IMethod> methods)

Parameters

methods IEnumerable<IMethod>

This sequence of IMethod objects.

Returns

IEnumerable<IType>

ParentTypes(IEnumerable<IType>)

Returns a sequence of IType objects made of parent types of types in types that are nested in parent types.

public static IEnumerable<IType> ParentTypes(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IType objects.

Returns

IEnumerable<IType>

Remarks

If a type is nested in a type nested in a type, both parent types are returned. Notice that for third-party nested types, the property IType.IsNested is set to true, but the parent/nested relation represented by IType.NestedTypes and IMember.ParentType is not resolved. Hence this extension method only works for application types, not for third-party types.

See Also

UsAndChildEvents(IEnumerable<IAssembly>)

Returns a sequence of IAttributeTarget objects, containing these assemblies and all their ChildEvents objects.

public static IEnumerable<IAttributeTarget> UsAndChildEvents(this IEnumerable<IAssembly> assemblies)

Parameters

assemblies IEnumerable<IAssembly>

This sequence of IAssembly objects.

Returns

IEnumerable<IAttributeTarget>

UsAndChildEvents(IEnumerable<INamespace>)

Returns a sequence of IAttributeTarget objects, containing these namespaces and all their ChildEvents objects.

public static IEnumerable<ICodeElement> UsAndChildEvents(this IEnumerable<INamespace> namespaces)

Parameters

namespaces IEnumerable<INamespace>

This sequence of INamespace objects.

Returns

IEnumerable<ICodeElement>

UsAndChildEvents(IEnumerable<IType>)

Returns a sequence of IMember objects, containing these types and all their ChildEvents objects.

public static IEnumerable<IMember> UsAndChildEvents(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IType objects.

Returns

IEnumerable<IMember>

UsAndChildFields(IEnumerable<IAssembly>)

Returns a sequence of IAttributeTarget objects, containing these assemblies and all their ChildFields objects.

public static IEnumerable<IAttributeTarget> UsAndChildFields(this IEnumerable<IAssembly> assemblies)

Parameters

assemblies IEnumerable<IAssembly>

This sequence of IAssembly objects.

Returns

IEnumerable<IAttributeTarget>

UsAndChildFields(IEnumerable<INamespace>)

Returns a sequence of ICodeElement objects, containing these namespaces and all their ChildFields objects.

public static IEnumerable<ICodeElement> UsAndChildFields(this IEnumerable<INamespace> namespaces)

Parameters

namespaces IEnumerable<INamespace>

This sequence of INamespace objects.

Returns

IEnumerable<ICodeElement>

UsAndChildFields(IEnumerable<IType>)

Returns a sequence of IMember objects, containing these types and all their Fields objects.

public static IEnumerable<IMember> UsAndChildFields(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IType objects.

Returns

IEnumerable<IMember>

UsAndChildMembers(IEnumerable<IAssembly>)

Returns a sequence of IAttributeTarget objects, containing these assemblies and all their ChildMembers objects.

public static IEnumerable<IAttributeTarget> UsAndChildMembers(this IEnumerable<IAssembly> assemblies)

Parameters

assemblies IEnumerable<IAssembly>

This sequence of IAssembly objects.

Returns

IEnumerable<IAttributeTarget>

UsAndChildMembers(IEnumerable<INamespace>)

Returns a sequence of ICodeElement objects, containing these namespaces and all their ChildMembers objects.

public static IEnumerable<ICodeElement> UsAndChildMembers(this IEnumerable<INamespace> namespaces)

Parameters

namespaces IEnumerable<INamespace>

This sequence of INamespace objects.

Returns

IEnumerable<ICodeElement>

UsAndChildMembers(IEnumerable<IType>)

Returns a sequence of IMember objects, containing these types and and all their ChildMembers objects.

public static IEnumerable<IMember> UsAndChildMembers(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IType objects.

Returns

IEnumerable<IMember>

UsAndChildMethods(IEnumerable<IAssembly>)

Returns a sequence of ICodeContainer objects, containing these assemblies and all their ChildMethods objects.

public static IEnumerable<ICodeContainer> UsAndChildMethods(this IEnumerable<IAssembly> assemblies)

Parameters

assemblies IEnumerable<IAssembly>

This sequence of IAssembly objects.

Returns

IEnumerable<ICodeContainer>

UsAndChildMethods(IEnumerable<INamespace>)

Returns a sequence of ICodeContainer objects, containing these namespaces and all their ChildMethods objects.

public static IEnumerable<ICodeContainer> UsAndChildMethods(this IEnumerable<INamespace> namespaces)

Parameters

namespaces IEnumerable<INamespace>

This sequence of INamespace objects.

Returns

IEnumerable<ICodeContainer>

UsAndChildMethods(IEnumerable<IType>)

Returns a sequence of ICodeContainer objects, containing these types and all their MethodsAndConstructors objects.

public static IEnumerable<ICodeContainer> UsAndChildMethods(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IType objects.

Returns

IEnumerable<ICodeContainer>

Remarks

This extension method could also return a sequence of IMember. The choice of ICodeContainer is arbitrary and Cast<TResult>(IEnumerable) can still be used on returned sequence.

UsAndChildNamespaces(IEnumerable<IAssembly>)

Returns a sequence of ICodeElementParent objects, containing these assemblies and all their ChildNamespaces objects.

public static IEnumerable<ICodeElementParent> UsAndChildNamespaces(this IEnumerable<IAssembly> assemblies)

Parameters

assemblies IEnumerable<IAssembly>

This sequence of IAssembly objects.

Returns

IEnumerable<ICodeElementParent>

UsAndChildNamespacesAndTypes(IEnumerable<IAssembly>)

Returns a sequence of ICodeElementParent objects, containing these assemblies and all their ChildNamespaces and ChildTypes objects.

public static IEnumerable<ICodeElementParent> UsAndChildNamespacesAndTypes(this IEnumerable<IAssembly> assemblies)

Parameters

assemblies IEnumerable<IAssembly>

This sequence of IAssembly objects.

Returns

IEnumerable<ICodeElementParent>

UsAndChildNamespacesTypesAndMembers(IEnumerable<IAssembly>)

Returns a sequence of ICodeElement objects, containing these assemblies and all their ChildNamespaces and ChildTypesAndMembers objects.

public static IEnumerable<ICodeElement> UsAndChildNamespacesTypesAndMembers(this IEnumerable<IAssembly> assemblies)

Parameters

assemblies IEnumerable<IAssembly>

This sequence of IAssembly objects.

Returns

IEnumerable<ICodeElement>

UsAndChildProperties(IEnumerable<IAssembly>)

Returns a sequence of IAttributeTarget objects, containing these assemblies and all their ChildProperties objects.

public static IEnumerable<IAttributeTarget> UsAndChildProperties(this IEnumerable<IAssembly> assemblies)

Parameters

assemblies IEnumerable<IAssembly>

This sequence of IAssembly objects.

Returns

IEnumerable<IAttributeTarget>

UsAndChildProperties(IEnumerable<INamespace>)

Returns a sequence of IAttributeTarget objects, containing these namespaces and all their ChildProperties objects.

public static IEnumerable<ICodeElement> UsAndChildProperties(this IEnumerable<INamespace> namespaces)

Parameters

namespaces IEnumerable<INamespace>

This sequence of INamespace objects.

Returns

IEnumerable<ICodeElement>

UsAndChildProperties(IEnumerable<IType>)

Returns a sequence of IMember objects, containing these types and all their ChildProperties objects.

public static IEnumerable<IMember> UsAndChildProperties(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IType objects.

Returns

IEnumerable<IMember>

UsAndChildTypes(IEnumerable<IAssembly>)

Returns a sequence of ICodeElementParent objects, containing these assemblies and all their ChildTypes objects.

public static IEnumerable<ICodeElementParent> UsAndChildTypes(this IEnumerable<IAssembly> assemblies)

Parameters

assemblies IEnumerable<IAssembly>

This sequence of IAssembly objects.

Returns

IEnumerable<ICodeElementParent>

UsAndChildTypes(IEnumerable<INamespace>)

Returns a sequence of ICodeElementParent objects, containing these namespaces and all their ChildTypes objects.

public static IEnumerable<ICodeElementParent> UsAndChildTypes(this IEnumerable<INamespace> namespaces)

Parameters

namespaces IEnumerable<INamespace>

This sequence of INamespace objects.

Returns

IEnumerable<ICodeElementParent>

UsAndChildTypesAndMembers(IEnumerable<IAssembly>)

Returns a sequence of IAttributeTarget objects, containing these assemblies and all their ChildTypesAndMembers objects.

public static IEnumerable<IAttributeTarget> UsAndChildTypesAndMembers(this IEnumerable<IAssembly> assemblies)

Parameters

assemblies IEnumerable<IAssembly>

This sequence of IAssembly objects.

Returns

IEnumerable<IAttributeTarget>

UsAndChildTypesAndMembers(IEnumerable<INamespace>)

Returns a sequence of ICodeElement objects, containing these namespaces and all their ChildTypesAndMembers objects.

public static IEnumerable<ICodeElement> UsAndChildTypesAndMembers(this IEnumerable<INamespace> namespaces)

Parameters

namespaces IEnumerable<INamespace>

This sequence of INamespace objects.

Returns

IEnumerable<ICodeElement>

UsAndOurNestedTypes(IEnumerable<IType>)

Returns a sequence of IType objects, containing these types and all their nested types.

public static IEnumerable<IType> UsAndOurNestedTypes(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IType objects.

Returns

IEnumerable<IType>

Remarks

If a type has a nested type that has a nested type, both nested types are returned. Notice that for third-party nested types, the property IType.IsNested is set to true, but the parent/nested relation represented by IType.NestedTypes and IMember.ParentType is not resolved. Hence this extension method only works for application types, not for third-party types.

See Also

UsAndOurParentTypes(IEnumerable<IType>)

Returns a sequence of IType objects, containing these types and, for types in types that are nested in parent types, the returned sequence contains also all their parent types.

public static IEnumerable<IType> UsAndOurParentTypes(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IType objects.

Returns

IEnumerable<IType>

Remarks

If a type is nested in a type nested in a type, both parent types are returned. Notice that for third-party nested types, the property IType.IsNested is set to true, but the parent/nested relation represented by IType.NestedTypes and IMember.ParentType is not resolved. Hence this extension method only works for application types, not for third-party types.

See Also

UsAndOurParentTypesAndOurNestedTypes(IEnumerable<IType>)

Returns a sequence of IType objects, containing these types and all their nested types and, for types in types that are nested in parent types, the returned sequence contains also all their parent types.

public static IEnumerable<IType> UsAndOurParentTypesAndOurNestedTypes(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IType objects.

Returns

IEnumerable<IType>

Remarks

If a type has a nested type that has a nested type, both nested types are returned.
If a type is nested in a type nested in a type, both parent types are returned.
Notice that for third-party nested types, the property IType.IsNested is set to true, but the parent/nested relation represented by IType.NestedTypes and IMember.ParentType is not resolved. Hence this extension method only works for application types, not for third-party types.

See Also

UsAndParentAssemblies(IEnumerable<IField>)

Returns a sequence of IAttributeTarget objects, containing these fields and and all their ParentAssembly objects.

public static IEnumerable<IAttributeTarget> UsAndParentAssemblies(this IEnumerable<IField> fields)

Parameters

fields IEnumerable<IField>

This sequence of IField objects.

Returns

IEnumerable<IAttributeTarget>

UsAndParentAssemblies(IEnumerable<IMember>)

Returns a sequence of IAttributeTarget objects, containing these members and and all their ParentAssembly objects.

public static IEnumerable<IAttributeTarget> UsAndParentAssemblies(this IEnumerable<IMember> members)

Parameters

members IEnumerable<IMember>

This sequence of IMember objects.

Returns

IEnumerable<IAttributeTarget>

UsAndParentAssemblies(IEnumerable<IMethod>)

Returns a sequence of ICodeContainer objects, containing these methods and and all their ParentAssembly objects.

public static IEnumerable<ICodeContainer> UsAndParentAssemblies(this IEnumerable<IMethod> methods)

Parameters

methods IEnumerable<IMethod>

This sequence of IMethod objects.

Returns

IEnumerable<ICodeContainer>

UsAndParentAssemblies(IEnumerable<INamespace>)

Returns a sequence of ICodeElementParent objects, containing these namespaces and all their ParentAssembly objects.

public static IEnumerable<ICodeElementParent> UsAndParentAssemblies(this IEnumerable<INamespace> namespaces)

Parameters

namespaces IEnumerable<INamespace>

This sequence of INamespace objects.

Returns

IEnumerable<ICodeElementParent>

UsAndParentAssemblies(IEnumerable<IType>)

Returns a sequence of ICodeElementParent objects, containing these types and all their ParentAssembly objects.

public static IEnumerable<ICodeElementParent> UsAndParentAssemblies(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IType objects.

Returns

IEnumerable<ICodeElementParent>

UsAndParentAssembliesAndChildTypes(IEnumerable<INamespace>)

Returns a sequence of ICodeElementParent objects, containing these namespaces and all their ChildTypes objects, and all their ParentAssembly objects.

public static IEnumerable<ICodeElementParent> UsAndParentAssembliesAndChildTypes(this IEnumerable<INamespace> namespaces)

Parameters

namespaces IEnumerable<INamespace>

This sequence of INamespace objects.

Returns

IEnumerable<ICodeElementParent>

UsAndParentAssembliesAndNamespaces(IEnumerable<IField>)

Returns a sequence of ICodeElement objects, containing these fields and and all their ParentAssembly and ParentNamespace objects.

public static IEnumerable<ICodeElement> UsAndParentAssembliesAndNamespaces(this IEnumerable<IField> fields)

Parameters

fields IEnumerable<IField>

This sequence of IField objects.

Returns

IEnumerable<ICodeElement>

UsAndParentAssembliesAndNamespaces(IEnumerable<IMember>)

Returns a sequence of ICodeElement objects, containing these members and and all their ParentAssembly and ParentNamespace objects.

public static IEnumerable<ICodeElement> UsAndParentAssembliesAndNamespaces(this IEnumerable<IMember> members)

Parameters

members IEnumerable<IMember>

This sequence of IMember objects.

Returns

IEnumerable<ICodeElement>

UsAndParentAssembliesAndNamespaces(IEnumerable<IMethod>)

Returns a sequence of ICodeContainer objects, containing these methods and and all their ParentAssembly and ParentNamespace objects.

public static IEnumerable<ICodeContainer> UsAndParentAssembliesAndNamespaces(this IEnumerable<IMethod> methods)

Parameters

methods IEnumerable<IMethod>

This sequence of IMethod objects.

Returns

IEnumerable<ICodeContainer>

UsAndParentAssembliesAndNamespaces(IEnumerable<IType>)

Returns a sequence of ICodeElementParent objects, containing these types and all their ParentAssembly and ParentNamespace objects.

public static IEnumerable<ICodeElementParent> UsAndParentAssembliesAndNamespaces(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IType objects.

Returns

IEnumerable<ICodeElementParent>

UsAndParentAssembliesAndNamespacesAndChildMembers(IEnumerable<IType>)

Returns a sequence of ICodeElement objects, containing these types and and all their ParentAssembly, ParentNamespace and ChildMembers objects.

public static IEnumerable<ICodeElement> UsAndParentAssembliesAndNamespacesAndChildMembers(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IType objects.

Returns

IEnumerable<ICodeElement>

UsAndParentAssembliesNamespacesAndTypes(IEnumerable<IField>)

Returns a sequence of ICodeElement objects, containing these fields and and all their ParentAssembly, ParentNamespace and ParentType objects.

public static IEnumerable<ICodeElement> UsAndParentAssembliesNamespacesAndTypes(this IEnumerable<IField> fields)

Parameters

fields IEnumerable<IField>

This sequence of IField objects.

Returns

IEnumerable<ICodeElement>

UsAndParentAssembliesNamespacesAndTypes(IEnumerable<IMember>)

Returns a sequence of ICodeElement objects, containing these members and and all their ParentAssembly, ParentNamespace and ParentType objects.

public static IEnumerable<ICodeElement> UsAndParentAssembliesNamespacesAndTypes(this IEnumerable<IMember> members)

Parameters

members IEnumerable<IMember>

This sequence of IMember objects.

Returns

IEnumerable<ICodeElement>

Remarks

For a IType object in the sequence members, a parent type is added to the result sequence only if it is a nested type.
If such a type is nested in a nested type all its parents types are added to the result sequence.

If the parent type of a nested type is already in the sequence members, it is not added a second time because all sequences returned by projection methods are doublon-free.

UsAndParentAssembliesNamespacesAndTypes(IEnumerable<IMethod>)

Returns a sequence of ICodeContainer objects, containing these methods and and all their ParentAssembly, ParentNamespace and ParentType objects.

public static IEnumerable<ICodeContainer> UsAndParentAssembliesNamespacesAndTypes(this IEnumerable<IMethod> methods)

Parameters

methods IEnumerable<IMethod>

This sequence of IMethod objects.

Returns

IEnumerable<ICodeContainer>

UsAndParentNamespaces(IEnumerable<IField>)

Returns a sequence of ICodeElement objects, containing these fields and and all their ParentNamespace objects.

public static IEnumerable<ICodeElement> UsAndParentNamespaces(this IEnumerable<IField> fields)

Parameters

fields IEnumerable<IField>

This sequence of IField objects.

Returns

IEnumerable<ICodeElement>

UsAndParentNamespaces(IEnumerable<IMember>)

Returns a sequence of ICodeElement objects, containing these members and and all their ParentNamespace objects.

public static IEnumerable<ICodeElement> UsAndParentNamespaces(this IEnumerable<IMember> members)

Parameters

members IEnumerable<IMember>

This sequence of IMember objects.

Returns

IEnumerable<ICodeElement>

UsAndParentNamespaces(IEnumerable<IMethod>)

Returns a sequence of ICodeContainer objects, containing these methods and and all their ParentNamespace objects.

public static IEnumerable<ICodeContainer> UsAndParentNamespaces(this IEnumerable<IMethod> methods)

Parameters

methods IEnumerable<IMethod>

This sequence of IMethod objects.

Returns

IEnumerable<ICodeContainer>

UsAndParentNamespaces(IEnumerable<IType>)

Returns a sequence of ICodeElementParent objects, containing these types and all their ParentNamespace objects.

public static IEnumerable<ICodeElementParent> UsAndParentNamespaces(this IEnumerable<IType> types)

Parameters

types IEnumerable<IType>

This sequence of IType objects.

Returns

IEnumerable<ICodeElementParent>

UsAndParentTypes(IEnumerable<IField>)

Returns a sequence of IMember objects, containing these fields and and all their ParentType objects.

public static IEnumerable<IMember> UsAndParentTypes(this IEnumerable<IField> fields)

Parameters

fields IEnumerable<IField>

This sequence of IField objects.

Returns

IEnumerable<IMember>

UsAndParentTypes(IEnumerable<IMember>)

Returns a sequence of IMember objects, containing these members and and all their ParentType objects.

public static IEnumerable<IMember> UsAndParentTypes(this IEnumerable<IMember> members)

Parameters

members IEnumerable<IMember>

This sequence of IMember objects.

Returns

IEnumerable<IMember>

Remarks

For a IType object in the sequence members, a parent type is added to the result sequence only if it is a nested type.
If such a type is nested in a nested type all its parents types are added to the result sequence.

If the parent type of a nested type is already in the sequence members, it is not added a second time because all sequences returned by projection methods are doublon-free.

UsAndParentTypes(IEnumerable<IMethod>)

Returns a sequence of ICodeContainer objects, containing these methods and and all their ParentType objects.

public static IEnumerable<ICodeContainer> UsAndParentTypes(this IEnumerable<IMethod> methods)

Parameters

methods IEnumerable<IMethod>

This sequence of IMethod objects.

Returns

IEnumerable<ICodeContainer>

Remarks

This extension method could also return a sequence of IMember. The choice of ICodeContainer is arbitrary and Cast<TResult>(IEnumerable) can still be used on returned sequence.