Table of Contents

Class ExtensionMethodsSequenceUsage

Namespace
NDepend.CodeModel
Assembly
NDepend.API.dll

Provides a set of extension methods to resolve incoming or outgoing dependencies, from or to, a sequence of code elements.

public static class ExtensionMethodsSequenceUsage
Inheritance
ExtensionMethodsSequenceUsage
Inherited Members

Methods (40)

DepthOfAssignAnyFields(IEnumerable<IMethod>, IEnumerable<IField>)

Returns a ICodeMetric<TCodeElement, TNumeric> object whose DefinitionDomain is a sub-sequence of this sequence methods, containing only methods that directly or indirectly assign any field in fieldsAssigned. The metric value for each method in DefinitionDomain is equal to the smallest depth of usage of any field assigned.

public static ICodeMetric<IMethod, ushort> DepthOfAssignAnyFields(this IEnumerable<IMethod> methods, IEnumerable<IField> fieldsAssigned)

Parameters

methods IEnumerable<IMethod>

This sequence of methods.

fieldsAssigned IEnumerable<IField>

The sequence of fields assigned by methods in the returned sequence.

Returns

ICodeMetric<IMethod, ushort>

Remarks

The depth value for methods in returned code metric DefinitionDomain, that are directly assigning any field in fieldsAssigned, is 0.
The depth value for methods in returned code metric DefinitionDomain, that are directly calling a method that assigns any field in fieldsAssigned, is 1.
And so forth.
This extension method has a O(methods.Count + fieldsAssigned.Count) time complexity.

See Also

DepthOfAssignField(IEnumerable<IMethod>, IField)

Returns a ICodeMetric<TCodeElement, TNumeric> object whose DefinitionDomain is a sub-sequence of this sequence methods, containing only methods that directly or indirectly assign fieldAssigned. The metric value for each method in DefinitionDomain is equal to the depth of usage of the field.

public static ICodeMetric<IMethod, ushort> DepthOfAssignField(this IEnumerable<IMethod> methods, IField fieldAssigned)

Parameters

methods IEnumerable<IMethod>

This sequence of methods.

fieldAssigned IField

The field assigned by all methods in the returned sequence.

Returns

ICodeMetric<IMethod, ushort>

Remarks

The depth value for methods in returned code metric DefinitionDomain, that are directly assigning fieldAssigned, is 0.
The depth value for methods in returned code metric DefinitionDomain, that are directly calling a method that assigns fieldAssigned, is 1.
And so forth.
This extension method has a O(methods.Count) time complexity.

See Also

DepthOfCreateA(IEnumerable<IMethod>, IType)

Returns a ICodeMetric<TCodeElement, TNumeric> object whose DefinitionDomain is a sub-sequence of this sequence methods, containing only methods that directly or indirectly call a constructor of typeCreated. The metric value for each method in DefinitionDomain is equal to the smallest depth of usage of a constructor.

public static ICodeMetric<IMethod, ushort> DepthOfCreateA(this IEnumerable<IMethod> methods, IType typeCreated)

Parameters

methods IEnumerable<IMethod>

This sequence of methods.

typeCreated IType

The type directly or indirectly instantiated by all methods in the returned sequence.

Returns

ICodeMetric<IMethod, ushort>

Remarks

The depth value for methods in returned code metric DefinitionDomain, that are constructors of typeCreated, is 0.
The depth value for methods in returned code metric DefinitionDomain, that are directly calling a constructor of typeCreated, is 1.
And so forth.
This extension method has a O(methods.Count) time complexity.

See Also

DepthOfCreateAny(IEnumerable<IMethod>, IEnumerable<IType>)

Returns a ICodeMetric<TCodeElement, TNumeric> object whose DefinitionDomain is a sub-sequence of this sequence methods, containing only methods that directly or indirectly call a constructor of a type in typesCreated. The metric value for each method in DefinitionDomain is equal to the smallest depth of usage of a constructor.

public static ICodeMetric<IMethod, ushort> DepthOfCreateAny(this IEnumerable<IMethod> methods, IEnumerable<IType> typesCreated)

Parameters

methods IEnumerable<IMethod>

This sequence of methods.

typesCreated IEnumerable<IType>

The types directly or indirectly instantiated by methods in the returned sequence.

Returns

ICodeMetric<IMethod, ushort>

Remarks

The depth value for methods in returned code metric DefinitionDomain, that are constructors of any type in typesCreated, is 0.
The depth value for methods in returned code metric DefinitionDomain, that are directly calling a constructor of any type in typesCreated, is 1.
And so forth.
This extension method has a O(methods.Count + typesCreated.Count) time complexity.

See Also

DepthOfDeriveFrom(IEnumerable<IType>, IType)

Returns a ICodeMetric<TCodeElement, TNumeric> object whose DefinitionDomain is a sub-sequence of this sequence types, containing only types that derive from typeBase. The metric value for each type in DefinitionDomain is equal to the depth of inheritance relative to typeBase.

public static ICodeMetric<IType, ushort> DepthOfDeriveFrom(this IEnumerable<IType> types, IType typeBase)

Parameters

types IEnumerable<IType>

This sequence of types.

typeBase IType

The type base of types in the returned code metric DefinitionDomain.

Returns

ICodeMetric<IType, ushort>

Remarks

The depth of typeBase is 0.
The depth of types that directly derive from typeBase is 1.
And so forth.
This extension method has a O(types.Count) time complexity.

See Also

DepthOfDeriveFromAny(IEnumerable<IType>, IEnumerable<IType>)

Returns a ICodeMetric<TCodeElement, TNumeric> object whose DefinitionDomain is a sub-sequence of this sequence types, containing only types that derive from any type in typesBase. The metric value for each type in DefinitionDomain is equal to the smallest depth of inheritance relative to any type in typesBase.

public static ICodeMetric<IType, ushort> DepthOfDeriveFromAny(this IEnumerable<IType> types, IEnumerable<IType> typesBase)

Parameters

types IEnumerable<IType>

This sequence of types.

typesBase IEnumerable<IType>

Types base of types in the returned code metric DefinitionDomain.

Returns

ICodeMetric<IType, ushort>

Remarks

The depth of any type in typesBase is 0.
The depth of types that directly derive from any type in typesBase is 1.
And so forth.
This extension method has a O(types.Count + typesBase.Count) time complexity.

See Also

DepthOfIsUsedByAny<TUsed, TUser>(IEnumerable<TUsed>, IEnumerable<TUser>)

Returns a ICodeMetric<TCodeElement, TNumeric> object whose DefinitionDomain is a sub-sequence of this sequence codeElementsUsed, containing only code elements directly or indirectly used by any code element in codeElementsUser. The metric value for each code element in DefinitionDomain is equal to the depth of usage.

public static ICodeMetric<TUsed, ushort> DepthOfIsUsedByAny<TUsed, TUser>(this IEnumerable<TUsed> codeElementsUsed, IEnumerable<TUser> codeElementsUser) where TUsed : class, ICodeElement where TUser : class, IUser

Parameters

codeElementsUsed IEnumerable<TUsed>

This sequence of code elements.

codeElementsUser IEnumerable<TUser>

The sequence of code elements that uses directly or indirectly code elements in the returned sequence.

Returns

ICodeMetric<TUsed, ushort>

Type Parameters

TUsed

The used code elements type that is IUsed or that implements IUsed.

TUser

The user code elements type that is IUser or that implements IUser.

Remarks

If a code element in codeElementsUser or a child or parent of a code element in codeElementsUser, is in the returned sequence, its depth of usage is 0.
The depth of usage of a code element in codeElementsUsed, directly used by a code element in codeElementsUser or a child or parent of a code element in codeElementsUser, is 1.
And so forth.
This extension method has a O(codeElementsUsed.Count + codeElementsUser.Count) time complexity.

See Also

DepthOfIsUsedBy<TUsed, TUser>(IEnumerable<TUsed>, TUser)

Returns a ICodeMetric<TCodeElement, TNumeric> object whose DefinitionDomain is a sub-sequence of this sequence codeElementsUsed, containing only code elements directly or indirectly used by codeElementUser. The metric value for each code element in DefinitionDomain is equal to the depth of usage.

public static ICodeMetric<TUsed, ushort> DepthOfIsUsedBy<TUsed, TUser>(this IEnumerable<TUsed> codeElementsUsed, TUser codeElementUser) where TUsed : class, ICodeElement where TUser : class, IUser

Parameters

codeElementsUsed IEnumerable<TUsed>

This sequence of code elements.

codeElementUser TUser

The code element that uses directly or indirectly code elements in the returned sequence.

Returns

ICodeMetric<TUsed, ushort>

Type Parameters

TUsed

The used code elements type that is IUsed or that implements IUsed.

TUser

The user code elements type that is IUser or that implements IUser.

Remarks

If codeElementUser or a child or parent of codeElementUser is in the returned sequence, its depth of usage is 0.
The depth of usage of a code element in codeElementsUsed, directly used by codeElementUser or a child or parent of codeElementUser, is 1.
And so forth.
This extension method has a O(codeElementsUsed.Count) time complexity.

See Also

DepthOfIsUsingAny<TUser, TUsed>(IEnumerable<TUser>, IEnumerable<TUsed>)

Returns a ICodeMetric<TCodeElement, TNumeric> object whose DefinitionDomain is a sub-sequence of this sequence codeElementsUser, containing only code elements directly or indirectly using any code element in codeElementsUsed. The metric value for each code element in DefinitionDomain is equal to the depth of usage.

public static ICodeMetric<TUser, ushort> DepthOfIsUsingAny<TUser, TUsed>(this IEnumerable<TUser> codeElementsUser, IEnumerable<TUsed> codeElementsUsed) where TUser : class, IUser where TUsed : class, ICodeElement

Parameters

codeElementsUser IEnumerable<TUser>

This sequence of code elements.

codeElementsUsed IEnumerable<TUsed>

The sequence of code elements that are directly or indirectly used by code elements in the returned sequence.

Returns

ICodeMetric<TUser, ushort>

Type Parameters

TUser

The user code elements type that is IUser or that implements IUser.

TUsed

The used code elements type that is IUsed or that implements IUsed.

Remarks

If a code element in codeElementsUsed or a child or parent of a code element in codeElementsUsed, is in the returned sequence, its depth of usage is 0.
The depth of usage of a code element in codeElementsUser, directly using a code element in codeElementsUsed or a child or parent of a code element in codeElementsUsed, is 1.
And so forth.
This extension method has a O(codeElementsUser.Count + codeElementsUsed.Count) time complexity.

See Also

DepthOfIsUsing<TUser, TUsed>(IEnumerable<TUser>, TUsed)

Returns a ICodeMetric<TCodeElement, TNumeric> object whose DefinitionDomain is a sub-sequence of this sequence codeElementsUser, containing only code elements directly or indirectly using codeElementUsed. The metric value for each code element in DefinitionDomain is equal to the depth of usage.

public static ICodeMetric<TUser, ushort> DepthOfIsUsing<TUser, TUsed>(this IEnumerable<TUser> codeElementsUser, TUsed codeElementUsed) where TUser : class, IUser where TUsed : class, ICodeElement

Parameters

codeElementsUser IEnumerable<TUser>

This sequence of code elements.

codeElementUsed TUsed

The code element that is directly or indirectly used by code elements in the returned sequence.

Returns

ICodeMetric<TUser, ushort>

Type Parameters

TUser

The user code elements type that is IUser or that implements IUser.

TUsed

The used code elements type that is IUsed or that implements IUsed.

Remarks

If codeElementUsed or a child or parent of codeElementUsed is in the returned sequence, its depth of usage is 0.
The depth of usage of a code element in codeElementsUser, directly using codeElementUsed or a child or parent of codeElementUsed, is 1.
And so forth.
This extension method has a O(codeElementsUser.Count) time complexity.

See Also

IndirectlyUsedByAny<TUsed, TUser>(IEnumerable<TUsed>, IEnumerable<TUser>)

Returns a sub-sequence of this sequence codeElementsUsed, containing only code elements directly or indirectly used by any code element in the sequence codeElementsUser .

public static IEnumerable<TUsed> IndirectlyUsedByAny<TUsed, TUser>(this IEnumerable<TUsed> codeElementsUsed, IEnumerable<TUser> codeElementsUser) where TUsed : class, ICodeElement where TUser : class, IUser

Parameters

codeElementsUsed IEnumerable<TUsed>

This sequence of code elements.

codeElementsUser IEnumerable<TUser>

The sequence of code elements that directly or indirectly uses code elements in the returned sequence.

Returns

IEnumerable<TUsed>

Type Parameters

TUsed

The used code elements type that is IUsed or that implements IUsed.

TUser

The user code elements type that is IUser or that implements IUser.

Remarks

Elements contained in both sequences are removed from the result, since such element is used by itelf.
This extension method has a O(codeElementsUsed.Count + codeElementsUser.Count) time complexity.

See Also

IndirectlyUsedBy<TUsed, TUser>(IEnumerable<TUsed>, TUser)

Returns a sub-sequence of this sequence codeElementsUsed, containing only code elements directly or indirectly used by codeElementUser .

public static IEnumerable<TUsed> IndirectlyUsedBy<TUsed, TUser>(this IEnumerable<TUsed> codeElementsUsed, TUser codeElementUser) where TUsed : class, ICodeElement where TUser : class, IUser

Parameters

codeElementsUsed IEnumerable<TUsed>

This sequence of code elements.

codeElementUser TUser

The code element that uses directly or indirectly code elements in the returned sequence.

Returns

IEnumerable<TUsed>

Type Parameters

TUsed

The used code elements type that is IUsed or that implements IUsed.

TUser

The user code elements type that is IUser or that implements IUser.

Remarks

This extension method has a O(codeElementsUsed.Count) time complexity.

See Also

IndirectlyUsingAny<TUser, TUsed>(IEnumerable<TUser>, IEnumerable<TUsed>)

Returns a sub-sequence of this sequence codeElementsUser, containing only code elements directly or indirectly used by any code element in the sequence codeElementsUsed .

public static IEnumerable<TUser> IndirectlyUsingAny<TUser, TUsed>(this IEnumerable<TUser> codeElementsUser, IEnumerable<TUsed> codeElementsUsed) where TUser : class, IUser where TUsed : class, ICodeElement

Parameters

codeElementsUser IEnumerable<TUser>

This sequence of code elements.

codeElementsUsed IEnumerable<TUsed>

The sequence of code elements that are directly or indirectly used by any code elements in the returned sequence.

Returns

IEnumerable<TUser>

Type Parameters

TUser

The user code elements type that is IUser or that implements IUser.

TUsed

The used code elements type that is IUsed or that implements IUsed.

Remarks

Elements contained in both sequences are removed from the result, since such element is using itelf.
This extension method has a O(codeElementsUsed.Count + codeElementsUser.Count) time complexity.

See Also

IndirectlyUsing<TUser, TUsed>(IEnumerable<TUser>, TUsed)

Returns a sub-sequence of this sequence codeElementsUser, containing only code elements directly or indirectly using codeElementUsed .

public static IEnumerable<TUser> IndirectlyUsing<TUser, TUsed>(this IEnumerable<TUser> codeElementsUser, TUsed codeElementUsed) where TUser : class, IUser where TUsed : class, ICodeElement

Parameters

codeElementsUser IEnumerable<TUser>

This sequence of code elements.

codeElementUsed TUsed

The code element that is directly or indirectly used by code elements in the returned sequence.

Returns

IEnumerable<TUser>

Type Parameters

TUser

The user code elements type that is IUser or that implements IUser.

TUsed

The used code elements type that is IUsed or that implements IUsed.

Remarks

This extension method has a O(codeElementsUser.Count) time complexity.

See Also

TaggedWithAllAttributes<TTagged>(IEnumerable<TTagged>, IEnumerable<IType>)

Returns a sub-sequence of this sequence codeElementsTagged, containing only code elements tagged with all attribute types in typesAttribute .

public static IEnumerable<TTagged> TaggedWithAllAttributes<TTagged>(this IEnumerable<TTagged> codeElementsTagged, IEnumerable<IType> typesAttribute) where TTagged : class, IAttributeTarget

Parameters

codeElementsTagged IEnumerable<TTagged>

This sequence of code elements.

typesAttribute IEnumerable<IType>

A sequence of types attribute that all tag code elements in the returned sequence.

Returns

IEnumerable<TTagged>

Type Parameters

TTagged

The tagged code elements' type that is IAttributeTarget or that implements IAttributeTarget, being one of IMethod, IField, IType or IAssembly type.

Remarks

This extension method has a O(codeElementsTagged.Count + typesAttribute.Count) time complexity.

See Also

TaggedWithAnyAttributes<TTagged>(IEnumerable<TTagged>, IEnumerable<IType>)

Returns a sub-sequence of this sequence codeElementsTagged, containing only code elements tagged with any attribute type in typesAttribute .

public static IEnumerable<TTagged> TaggedWithAnyAttributes<TTagged>(this IEnumerable<TTagged> codeElementsTagged, IEnumerable<IType> typesAttribute) where TTagged : class, IAttributeTarget

Parameters

codeElementsTagged IEnumerable<TTagged>

This sequence of code elements.

typesAttribute IEnumerable<IType>

A sequence of types attribute that tag code elements in the returned sequence.

Returns

IEnumerable<TTagged>

Type Parameters

TTagged

The tagged code elements' type that is IAttributeTarget or that implements IAttributeTarget, being one of IMethod, IField, IType or IAssembly type.

Remarks

This extension method has a O(codeElementsTagged.Count + typesAttribute.Count) time complexity.

See Also

TaggedWithAttribute<TTagged>(IEnumerable<TTagged>, IType)

Returns a sub-sequence of this sequence codeElementsTagged, containing only code elements tagged with typeAttribute .

public static IEnumerable<TTagged> TaggedWithAttribute<TTagged>(this IEnumerable<TTagged> codeElementsTagged, IType typeAttribute) where TTagged : class, IAttributeTarget

Parameters

codeElementsTagged IEnumerable<TTagged>

This sequence of code elements.

typeAttribute IType

The type attribute that tags code elements in the returned sequence.

Returns

IEnumerable<TTagged>

Type Parameters

TTagged

The tagged code elements' type that is IAttributeTarget or that implements IAttributeTarget, being one of IMethod, IField, IType or IAssembly type.

Remarks

This extension method has a O(codeElementsTagged.Count) time complexity.

See Also

ThatAssignAnyFields(IEnumerable<IMethod>, IEnumerable<IField>)

Returns a sub-sequence of this sequence methods, containing only methods that assigns any field in fieldsAssigned.

public static IEnumerable<IMethod> ThatAssignAnyFields(this IEnumerable<IMethod> methods, IEnumerable<IField> fieldsAssigned)

Parameters

methods IEnumerable<IMethod>

This sequence of methods.

fieldsAssigned IEnumerable<IField>

The sequence of fields assigned by methods in the returned sequence.

Returns

IEnumerable<IMethod>

Remarks

This extension method has a O(methods.Count + fieldsAssigned.Count) time complexity.

See Also

ThatAssignField(IEnumerable<IMethod>, IField)

Returns a sub-sequence of this sequence methods, containing only methods that assigns the field fieldAssigned.

public static IEnumerable<IMethod> ThatAssignField(this IEnumerable<IMethod> methods, IField fieldAssigned)

Parameters

methods IEnumerable<IMethod>

This sequence of methods.

fieldAssigned IField

The field assigned by all methods in the returned sequence.

Returns

IEnumerable<IMethod>

Remarks

This extension method has a O(methods.Count) time complexity.

See Also

ThatCreateA(IEnumerable<IMethod>, IType)

Returns a sub-sequence of this sequence methods, containing only methods that calls a constructor of typeCreated.

public static IEnumerable<IMethod> ThatCreateA(this IEnumerable<IMethod> methods, IType typeCreated)

Parameters

methods IEnumerable<IMethod>

This sequence of methods.

typeCreated IType

The type instantiated by all methods in the returned sequence.

Returns

IEnumerable<IMethod>

Remarks

This extension method has a O(methods.Count) time complexity.

See Also

ThatCreateAny(IEnumerable<IMethod>, IEnumerable<IType>)

Returns a sub-sequence of this sequence methods, containing only methods that calls a constructor of any type in typesCreated.

public static IEnumerable<IMethod> ThatCreateAny(this IEnumerable<IMethod> methods, IEnumerable<IType> typesCreated)

Parameters

methods IEnumerable<IMethod>

This sequence of methods.

typesCreated IEnumerable<IType>

The types instantiated by methods in the returned sequence.

Returns

IEnumerable<IMethod>

Remarks

This extension method has a O(methods.Count + typesCreated.Count) time complexity.

See Also

ThatDeriveFrom(IEnumerable<IType>, IType)

Returns a sub-sequence of this sequence types, containing only types that derive from typeBase .

public static IEnumerable<IType> ThatDeriveFrom(this IEnumerable<IType> types, IType typeBase)

Parameters

types IEnumerable<IType>

This sequence of types.

typeBase IType

The type base of types in the returned sequence.

Returns

IEnumerable<IType>

Remarks

This extension method has a O(types.Count) time complexity.

See Also

ThatDeriveFromAny(IEnumerable<IType>, IEnumerable<IType>)

Returns a sub-sequence of this sequence types, containing only types that derive from any type in typesBase .

public static IEnumerable<IType> ThatDeriveFromAny(this IEnumerable<IType> types, IEnumerable<IType> typesBase)

Parameters

types IEnumerable<IType>

This sequence of types.

typesBase IEnumerable<IType>

Types base of types in the returned sequence.

Returns

IEnumerable<IType>

Remarks

This extension method has a O(types.Count + typesBase.Count) time complexity.

See Also

ThatDirectlyDeriveFrom(IEnumerable<IType>, IType)

Returns a sub-sequence of this sequence types, containing only types that directly derive from typeBase .

public static IEnumerable<IType> ThatDirectlyDeriveFrom(this IEnumerable<IType> types, IType typeBase)

Parameters

types IEnumerable<IType>

This sequence of types.

typeBase IType

The direct type base of types in the returned sequence.

Returns

IEnumerable<IType>

Remarks

This extension method has a O(types.Count) time complexity.

See Also

ThatDirectlyDeriveFromAny(IEnumerable<IType>, IEnumerable<IType>)

Returns a sub-sequence of this sequence types, containing only types that directly derive from any type in typesBase .

public static IEnumerable<IType> ThatDirectlyDeriveFromAny(this IEnumerable<IType> types, IEnumerable<IType> typesBase)

Parameters

types IEnumerable<IType>

This sequence of types.

typesBase IEnumerable<IType>

Direct types base of types in the returned sequence.

Returns

IEnumerable<IType>

Remarks

This extension method has a O(types.Count + typesBase.Count) time complexity.

See Also

ThatImplement(IEnumerable<IType>, IType)

Returns a sub-sequence of this sequence types, containing only types that implement, or interfaces that extend, interface.

public static IEnumerable<IType> ThatImplement(this IEnumerable<IType> types, IType @interface)

Parameters

types IEnumerable<IType>

This sequence of types.

interface IType

The interface implemented by types in the returned sequence.

Returns

IEnumerable<IType>

Remarks

If the interface type is not an interface, the sequence returned is empty.
This extension method has a O(types.Count) time complexity.

See Also

ThatImplementAll(IEnumerable<IType>, IEnumerable<IType>)

Returns a sub-sequence of this sequence types, containing only types that implement, or interfaces that extend, all interfaces in interfaces.

public static IEnumerable<IType> ThatImplementAll(this IEnumerable<IType> types, IEnumerable<IType> interfaces)

Parameters

types IEnumerable<IType>

This sequence of types.

interfaces IEnumerable<IType>

The sequence of interfaces all implemented by all types in the returned sequence.

Returns

IEnumerable<IType>

Remarks

Types in interfaces that are not interface, are not taken account.
This extension method has a O(types.Count + interfaces.Count) time complexity.

See Also

ThatImplementAny(IEnumerable<IType>, IEnumerable<IType>)

Returns a sub-sequence of this sequence types, containing only types that implement, or interfaces that extend, any interface in interfaces.

public static IEnumerable<IType> ThatImplementAny(this IEnumerable<IType> types, IEnumerable<IType> interfaces)

Parameters

types IEnumerable<IType>

This sequence of types.

interfaces IEnumerable<IType>

The sequence of interfaces implemented by types in the returned sequence.

Returns

IEnumerable<IType>

Remarks

Types in interfaces that are not interface, are not taken account.
This extension method has a O(types.Count + interfaces.Count) time complexity.

See Also

ThatIndirectlyAssignAnyFields(IEnumerable<IMethod>, IEnumerable<IField>)

Returns a sub-sequence of this sequence methods, containing only methods that assigns directly or indirectly any field in fieldsAssigned.

public static IEnumerable<IMethod> ThatIndirectlyAssignAnyFields(this IEnumerable<IMethod> methods, IEnumerable<IField> fieldsAssigned)

Parameters

methods IEnumerable<IMethod>

This sequence of methods.

fieldsAssigned IEnumerable<IField>

The sequence of fields directly or indirectly assigned by methods in the returned sequence.

Returns

IEnumerable<IMethod>

Remarks

This extension method has a O(methods.Count + fieldsAssigned.Count) time complexity.

See Also

ThatIndirectlyCreateAny(IEnumerable<IMethod>, IEnumerable<IType>)

Returns a sub-sequence of this sequence methods, containing only methods that directly or indirectly calls a constructor of any type in typesCreated.

public static IEnumerable<IMethod> ThatIndirectlyCreateAny(this IEnumerable<IMethod> methods, IEnumerable<IType> typesCreated)

Parameters

methods IEnumerable<IMethod>

This sequence of methods.

typesCreated IEnumerable<IType>

The types instantiated directly or indirectly by methods in the returned sequence.

Returns

IEnumerable<IMethod>

Remarks

Constructors of types in typesCreated are not kept in the returned sequence.
This extension method has a O(methods.Count + typesCreated.Count) time complexity.

See Also

UsedByAll<TUsed, TUser>(IEnumerable<TUsed>, IEnumerable<TUser>)

Returns a sub-sequence of this sequence codeElementsUsed, containing only code elements directly used by all code elements in the sequence codeElementsUser .

public static IEnumerable<TUsed> UsedByAll<TUsed, TUser>(this IEnumerable<TUsed> codeElementsUsed, IEnumerable<TUser> codeElementsUser) where TUsed : class, ICodeElement where TUser : class, IUser

Parameters

codeElementsUsed IEnumerable<TUsed>

This sequence of code elements.

codeElementsUser IEnumerable<TUser>

The sequence of code elements that all uses code elements in the returned sequence.

Returns

IEnumerable<TUsed>

Type Parameters

TUsed

The used code elements type that is IUsed or that implements IUsed.

TUser

The user code elements type that is IUser or that implements IUser.

Remarks

This extension method has a O(codeElementsUsed.Count) time complexity if TUsed is strictly finer-grained than TUser, like for example TUser is INamespace and TUsed is IType.
Otherwise it has a O(codeElementsUser.Count) time complexity.

See Also

UsedByAny<TUsed, TUser>(IEnumerable<TUsed>, IEnumerable<TUser>)

Returns a sub-sequence of this sequence codeElementsUsed, containing only code elements directly used by any code element in the sequence codeElementsUser .

public static IEnumerable<TUsed> UsedByAny<TUsed, TUser>(this IEnumerable<TUsed> codeElementsUsed, IEnumerable<TUser> codeElementsUser) where TUsed : class, ICodeElement where TUser : class, IUser

Parameters

codeElementsUsed IEnumerable<TUsed>

This sequence of code elements.

codeElementsUser IEnumerable<TUser>

The sequence of code elements that uses code elements in the returned sequence.

Returns

IEnumerable<TUsed>

Type Parameters

TUsed

The used code elements type that is IUsed or that implements IUsed.

TUser

The user code elements type that is IUser or that implements IUser.

Remarks

Elements contained in both sequences are removed from the result, since such element is used by itelf.
This extension method has a O(codeElementsUsed.Count + codeElementsUser.Count) time complexity.

See Also

UsedBy<TUsed, TUser>(IEnumerable<TUsed>, TUser)

Returns a sub-sequence of this sequence codeElementsUsed, containing only code elements directly used by codeElementUser .

public static IEnumerable<TUsed> UsedBy<TUsed, TUser>(this IEnumerable<TUsed> codeElementsUsed, TUser codeElementUser) where TUsed : class, ICodeElement where TUser : class, IUser

Parameters

codeElementsUsed IEnumerable<TUsed>

This sequence of code elements.

codeElementUser TUser

The code element that uses code elements in the returned sequence.

Returns

IEnumerable<TUsed>

Type Parameters

TUsed

The used code elements type that is IUsed or that implements IUsed.

TUser

The user code elements type that is IUser or that implements IUser.

Remarks

This extension method has a O(codeElementsUsed.Count) time complexity.

See Also

UsingAll<TUser, TUsed>(IEnumerable<TUser>, IEnumerable<TUsed>)

Returns a sub-sequence of this sequence codeElementsUser, containing only code elements directly using all code elements in the sequence codeElementsUsed .

public static IEnumerable<TUser> UsingAll<TUser, TUsed>(this IEnumerable<TUser> codeElementsUser, IEnumerable<TUsed> codeElementsUsed) where TUser : class, IUser where TUsed : class, ICodeElement

Parameters

codeElementsUser IEnumerable<TUser>

This sequence of code elements.

codeElementsUsed IEnumerable<TUsed>

The sequence of code elements that are all used by code elements in the returned sequence.

Returns

IEnumerable<TUser>

Type Parameters

TUser

The user code elements type that is IUser or that implements IUser.

TUsed

The used code elements type that is IUsed or that implements IUsed.

Remarks

This extension method has a O(codeElementsUser.Count) time complexity if TUser is strictly finer-grained than TUsed, like for example TUsed is INamespace and TUser is IType.
Otherwise it has a O(codeElementsUsed.Count) time complexity.

See Also

UsingAny<TUser, TUsed>(IEnumerable<TUser>, IEnumerable<TUsed>)

Returns a sub-sequence of this sequence codeElementsUser, containing only code elements directly used by any code element in the sequence codeElementsUsed.

public static IEnumerable<TUser> UsingAny<TUser, TUsed>(this IEnumerable<TUser> codeElementsUser, IEnumerable<TUsed> codeElementsUsed) where TUser : class, IUser where TUsed : class, ICodeElement

Parameters

codeElementsUser IEnumerable<TUser>

This sequence of code elements.

codeElementsUsed IEnumerable<TUsed>

The sequence of code elements that are used by any code elements in the returned sequence.

Returns

IEnumerable<TUser>

Type Parameters

TUser

The user code elements type that is IUser or that implements IUser.

TUsed

The used code elements type that is IUsed or that implements IUsed.

Remarks

Elements contained in both sequences are removed from the result, since such element is using itelf.
This extension method has a O(codeElementsUsed.Count + codeElementsUser.Count) time complexity.

See Also

Using<TUser, TUsed>(IEnumerable<TUser>, TUsed)

Returns a sub-sequence of this sequence codeElementsUser, containing only code elements directly using codeElementUsed .

public static IEnumerable<TUser> Using<TUser, TUsed>(this IEnumerable<TUser> codeElementsUser, TUsed codeElementUsed) where TUser : class, IUser where TUsed : class, ICodeElement

Parameters

codeElementsUser IEnumerable<TUser>

This sequence of code elements.

codeElementUsed TUsed

The code element that is used by code elements in the returned sequence.

Returns

IEnumerable<TUser>

Type Parameters

TUser

The user code elements type that is IUser or that implements IUser.

TUsed

The used code elements type that is IUsed or that implements IUsed.

Remarks

This extension method has a O(codeElementsUser.Count) time complexity.

See Also

WithFieldType(IEnumerable<IField>, IType)

Returns a sub-sequence of this sequence fields, containing only fields that have fieldType for field type.

public static IEnumerable<IField> WithFieldType(this IEnumerable<IField> fields, IType fieldType)

Parameters

fields IEnumerable<IField>

This sequence of fields.

fieldType IType

The field type of all fields in the returned sequence.

Returns

IEnumerable<IField>

Remarks

This extension method has a O(fields.Count) time complexity.

See Also

WithFieldTypeIn(IEnumerable<IField>, IEnumerable<IType>)

Returns a sub-sequence of this sequence fields, containing only fields that have any type in fieldTypes for field type.

public static IEnumerable<IField> WithFieldTypeIn(this IEnumerable<IField> fields, IEnumerable<IType> fieldTypes)

Parameters

fields IEnumerable<IField>

This sequence of fields.

fieldTypes IEnumerable<IType>

The sequence of field types of fields in the returned sequence.

Returns

IEnumerable<IField>

Remarks

This extension method has a O(fields.Count + fieldTypes.Count) time complexity.

See Also

WithReturnType(IEnumerable<IMethod>, IType)

Returns a sub-sequence of this sequence methods, containing only methods that have returnType for return type.

public static IEnumerable<IMethod> WithReturnType(this IEnumerable<IMethod> methods, IType returnType)

Parameters

methods IEnumerable<IMethod>

This sequence of methods.

returnType IType

The return type of all methods in the returned sequence.

Returns

IEnumerable<IMethod>

Remarks

This extension method has a O(methods.Count) time complexity.

See Also

WithReturnTypeIn(IEnumerable<IMethod>, IEnumerable<IType>)

Returns a sub-sequence of this sequence methods, containing only methods that have any type in returnTypes for return type.

public static IEnumerable<IMethod> WithReturnTypeIn(this IEnumerable<IMethod> methods, IEnumerable<IType> returnTypes)

Parameters

methods IEnumerable<IMethod>

This sequence of methods.

returnTypes IEnumerable<IType>

The sequence of return types of methods in the returned sequence.

Returns

IEnumerable<IMethod>

Remarks

This extension method has a O(methods.Count + returnTypes.Count) time complexity.

See Also