Class ExtensionMethodsProjection
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
assembliesIEnumerable<IAssembly>This sequence of IAssembly objects.
Returns
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
namespacesIEnumerable<INamespace>This sequence of INamespace objects.
Returns
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
typesIEnumerable<IType>This sequence of IType objects.
Returns
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
assembliesIEnumerable<IAssembly>This sequence of IAssembly objects.
Returns
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
namespacesIEnumerable<INamespace>This sequence of INamespace objects.
Returns
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
typesIEnumerable<IType>This sequence of IField objects.
Returns
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
assembliesIEnumerable<IAssembly>This sequence of IAssembly objects.
Returns
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
namespacesIEnumerable<INamespace>This sequence of INamespace objects.
Returns
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
typesIEnumerable<IType>This sequence of IType objects.
Returns
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
assembliesIEnumerable<IAssembly>This sequence of IAssembly objects.
Returns
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
namespacesIEnumerable<INamespace>This sequence of INamespace objects.
Returns
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
typesIEnumerable<IType>This sequence of IType objects.
Returns
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
assembliesIEnumerable<IAssembly>This sequence of IAssembly objects.
Returns
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
assembliesIEnumerable<IAssembly>This sequence of IAssembly objects.
Returns
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
assembliesIEnumerable<IAssembly>This sequence of IAssembly objects.
Returns
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
assembliesIEnumerable<IAssembly>This sequence of IAssembly objects.
Returns
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
namespacesIEnumerable<INamespace>This sequence of INamespace objects.
Returns
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
typesIEnumerable<IType>This sequence of IType objects.
Returns
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
assembliesIEnumerable<IAssembly>This sequence of IAssembly objects.
Returns
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
namespacesIEnumerable<INamespace>This sequence of INamespace objects.
Returns
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
assembliesIEnumerable<IAssembly>This sequence of IAssembly objects.
Returns
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
namespacesIEnumerable<INamespace>This sequence of INamespace objects.
Returns
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
typesIEnumerable<IType>This sequence of IType objects.
Returns
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
attributeTargetsIEnumerable<IAttributeTarget>This sequence of IAttributeTarget objects.
Returns
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
codeContainersIEnumerable<ICodeContainer>This sequence of ICodeContainer objects.
Returns
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
codeElementParentsIEnumerable<ICodeElementParent>This sequence of ICodeElementParent objects.
Returns
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
codeElementsIEnumerable<ICodeElement>This sequence of ICodeElement objects.
Returns
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
membersIEnumerable<IMember>This sequence of IMember objects.
Returns
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
fieldsIEnumerable<IField>This sequence of IField objects.
Returns
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
membersIEnumerable<IMember>This sequence of IMember objects.
Returns
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
methodsIEnumerable<IMethod>This sequence of IMethod objects.
Returns
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
namespacesIEnumerable<INamespace>This sequence of INamespace objects.
Returns
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
typesIEnumerable<IType>This sequence of IType objects.
Returns
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
fieldsIEnumerable<IField>This sequence of IField objects.
Returns
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
membersIEnumerable<IMember>This sequence of IMember objects.
Returns
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
methodsIEnumerable<IMethod>This sequence of IMethod objects.
Returns
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
typesIEnumerable<IType>This sequence of IType objects.
Returns
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
fieldsIEnumerable<IField>This sequence of IField objects.
Returns
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
membersIEnumerable<IMember>This sequence of IMember objects.
Returns
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
methodsIEnumerable<IMethod>This sequence of IMethod objects.
Returns
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
fieldsIEnumerable<IField>This sequence of IField objects.
Returns
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
membersIEnumerable<IMember>This sequence of IMember objects.
Returns
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
methodsIEnumerable<IMethod>This sequence of IMethod objects.
Returns
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
typesIEnumerable<IType>This sequence of IType objects.
Returns
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
fieldsIEnumerable<IField>This sequence of IField objects.
Returns
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
membersIEnumerable<IMember>This sequence of IMember objects.
Returns
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
methodsIEnumerable<IMethod>This sequence of IMethod objects.
Returns
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
typesIEnumerable<IType>This sequence of IType objects.
Returns
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
assembliesIEnumerable<IAssembly>This sequence of IAssembly objects.
Returns
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
namespacesIEnumerable<INamespace>This sequence of INamespace objects.
Returns
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
typesIEnumerable<IType>This sequence of IType objects.
Returns
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
assembliesIEnumerable<IAssembly>This sequence of IAssembly objects.
Returns
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
namespacesIEnumerable<INamespace>This sequence of INamespace objects.
Returns
UsAndChildFields(IEnumerable<IType>)
public static IEnumerable<IMember> UsAndChildFields(this IEnumerable<IType> types)
Parameters
typesIEnumerable<IType>This sequence of IType objects.
Returns
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
assembliesIEnumerable<IAssembly>This sequence of IAssembly objects.
Returns
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
namespacesIEnumerable<INamespace>This sequence of INamespace objects.
Returns
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
typesIEnumerable<IType>This sequence of IType objects.
Returns
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
assembliesIEnumerable<IAssembly>This sequence of IAssembly objects.
Returns
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
namespacesIEnumerable<INamespace>This sequence of INamespace objects.
Returns
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
typesIEnumerable<IType>This sequence of IType objects.
Returns
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
assembliesIEnumerable<IAssembly>This sequence of IAssembly objects.
Returns
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
assembliesIEnumerable<IAssembly>This sequence of IAssembly objects.
Returns
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
assembliesIEnumerable<IAssembly>This sequence of IAssembly objects.
Returns
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
assembliesIEnumerable<IAssembly>This sequence of IAssembly objects.
Returns
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
namespacesIEnumerable<INamespace>This sequence of INamespace objects.
Returns
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
typesIEnumerable<IType>This sequence of IType objects.
Returns
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
assembliesIEnumerable<IAssembly>This sequence of IAssembly objects.
Returns
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
namespacesIEnumerable<INamespace>This sequence of INamespace objects.
Returns
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
assembliesIEnumerable<IAssembly>This sequence of IAssembly objects.
Returns
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
namespacesIEnumerable<INamespace>This sequence of INamespace objects.
Returns
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
typesIEnumerable<IType>This sequence of IType objects.
Returns
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
typesIEnumerable<IType>This sequence of IType objects.
Returns
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
typesIEnumerable<IType>This sequence of IType objects.
Returns
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
fieldsIEnumerable<IField>This sequence of IField objects.
Returns
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
membersIEnumerable<IMember>This sequence of IMember objects.
Returns
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
methodsIEnumerable<IMethod>This sequence of IMethod objects.
Returns
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
namespacesIEnumerable<INamespace>This sequence of INamespace objects.
Returns
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
typesIEnumerable<IType>This sequence of IType objects.
Returns
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
namespacesIEnumerable<INamespace>This sequence of INamespace objects.
Returns
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
fieldsIEnumerable<IField>This sequence of IField objects.
Returns
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
membersIEnumerable<IMember>This sequence of IMember objects.
Returns
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
methodsIEnumerable<IMethod>This sequence of IMethod objects.
Returns
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
typesIEnumerable<IType>This sequence of IType objects.
Returns
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
typesIEnumerable<IType>This sequence of IType objects.
Returns
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
fieldsIEnumerable<IField>This sequence of IField objects.
Returns
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
membersIEnumerable<IMember>This sequence of IMember objects.
Returns
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
methodsIEnumerable<IMethod>This sequence of IMethod objects.
Returns
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
fieldsIEnumerable<IField>This sequence of IField objects.
Returns
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
membersIEnumerable<IMember>This sequence of IMember objects.
Returns
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
methodsIEnumerable<IMethod>This sequence of IMethod objects.
Returns
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
typesIEnumerable<IType>This sequence of IType objects.
Returns
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
fieldsIEnumerable<IField>This sequence of IField objects.
Returns
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
membersIEnumerable<IMember>This sequence of IMember objects.
Returns
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
methodsIEnumerable<IMethod>This sequence of IMethod objects.
Returns
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.