Interface ICodeElementParent
Represents a parent code element. This interface is implemented by IType, INamespace and IAssembly.
public interface ICodeElementParent : ICodeContainer, IUser, ICodeElement, IUsed
- Inherited Members
- Extension Methods
Properties (16)
ChildEvents
Gets a sequence of events declared in this namespace. If this code element is declared in (or is) a third-party assembly, gets only events used by the application.
IEnumerable<IEvent> ChildEvents { get; }
Property Value
Remarks
The result includes instance and static events.
ChildFields
Gets a sequence of fields declared in this namespace. If this code element is declared in (or is) a third-party assembly, gets only fields used by the application.
IEnumerable<IField> ChildFields { get; }
Property Value
Remarks
The result includes instance and static fields, and enumeration values and literal constant fields.
This property getter has a O(this.ChildFields.Count) time complexity.
If this is a ICodeBase, return the same sequence as ICodeBaseView.Fields.
ChildMembers
Gets a sequence of methods and fields declared in this scope. If this code element is declared in (or is) a third-party assembly, gets only methods and fields used by the application.
IEnumerable<IMember> ChildMembers { get; }
Property Value
Remarks
If this is a ICodeBase, return the same sequence as ICodeBaseView.Members.
- See Also
ChildMethods
Gets a sequence of methods declared in this namespace. If this code element is declared in (or is) a third-party assembly, gets only methods used by the application.
IEnumerable<IMethod> ChildMethods { get; }
Property Value
Remarks
The result includes methods, constructors, class constructors, property getter and setters, event adders and removers.
This property getter has a O(this.ChildMethods.Count) time complexity.
If this is a ICodeBase, return the same sequence as ICodeBaseView.Methods.
ChildNamespaces
Gets a sequence of namespaces declared in this scope. If this code element is declared in (or is) a third-party assembly, gets only methods used by the application.
IEnumerable<INamespace> ChildNamespaces { get; }
Property Value
Remarks
If this is an assembly:
- Gets a sequence of namespaces declared in this application assembly. For a third-party assembly, gets only namespaces used by the application.
- Notice that if N assemblies declare the same namespace, there are NINamespace objects with a common Name value, one object for each assembly that declares the namespace.
If this is a namespace: - The anonymous namespace doesn't have any child namespace.
- See: DirectChildNamespaces, ParentNamespaces, ParentNamespace
This property getter has a O(this.ChildNamespaces.Count) time complexity.
If this is a type returns an empty sequence.
If this is a ICodeBase, return the same sequence as ICodeBaseView.Namespaces.
ChildProperties
Gets a sequence of properties declared in this code element. If this code element is declared in (or is) a third-party assembly, gets only properties used by the application.
IEnumerable<IProperty> ChildProperties { get; }
Property Value
Remarks
The result includes instance and static properties and also indexers if any.
ChildTypes
Gets a sequence of types declared in this scope. If this code element is declared in (or is) a third-party assembly, gets only methods used by the application.
IEnumerable<IType> ChildTypes { get; }
Property Value
Remarks
The result includes classes, structures, interfaces, enumerations and delegates classes.
If this is a type, returns IType.NestedTypes.
This property getter has a O(this.ChildTypes.Count) time complexity.
If this is a ICodeBase, return the same sequence as ICodeBaseView.Types.
ChildTypesAndMembers
Gets a sequence of types, methods and fields declared in this scope. If this code element is declared in (or is) a third-party assembly, gets only types, methods and fields used by the application.
IEnumerable<IMember> ChildTypesAndMembers { get; }
Property Value
Remarks
If this is a ICodeBase, return the same sequence as ICodeBaseView.TypesAndMembers.
- See Also
DirectChildren
Returns a sequence of direct children code elements.
IEnumerable<ICodeElement> DirectChildren { get; }
Property Value
Remarks
If this code element is an assembly, a sequence of child namespaces will be returned.
If this code element is a namespace, a sequence of child types will be returned.
If this code element is a type, a sequence of child methods and fields will be returned.
MeAndDirectChildren
Returns a sequence of this code element followed by its direct children code elements.
IEnumerable<ICodeElement> MeAndDirectChildren { get; }
Property Value
Remarks
If this code element is an assembly, a sequence starting with this assembly followed by its child namespaces will be returned.
If this code element is a namespace, a sequence starting with this namespace followed by its child types will be returned.
If this code element is a type, a sequence starting with this type followed by its child methods and fields will be returned.
MeAndRecursiveChildren
Return a sequence of this code element followed by all its children code elements.
IEnumerable<ICodeElement> MeAndRecursiveChildren { get; }
Property Value
Remarks
If this code element is an assembly, a sequence starting with this assembly followed by its child namespaces, types, methods and fields will be returned.
If this code element is a namespace, a sequence starting with this namespace followed by its child types, methods and fields will be returned.
If this code element is a type, a sequence starting with this type followed by its child methods and fields will be returned.
NbEvents
Gets the number of events declared in this assembly, namespace or type. Gets null if the parent assembly is a third-party assembly.
uint? NbEvents { get; }
Property Value
- uint?
NbFields
Gets the number of fields declared in this assembly, namespace or type. Gets null if the parent assembly is a third-party assembly.
uint? NbFields { get; }
Property Value
- uint?
NbMethods
Gets the number of methods declared in this assembly, namespace or type. Gets null if the parent assembly is a third-party assembly.
uint? NbMethods { get; }
Property Value
- uint?
NbProperties
Gets the number of properties declared in this assembly, namespace or type. Gets null if the parent assembly is a third-party assembly.
uint? NbProperties { get; }
Property Value
- uint?
RecursiveChildren
Returns a sequence of all children code elements.
IEnumerable<ICodeElement> RecursiveChildren { get; }
Property Value
Remarks
If this code element is an assembly, a sequence of child namespaces, types, methods and fields will be returned.
If this code element is a namespace, a sequence of child types, methods and fields will be returned.
If this code element is a type, a sequence of child methods and fields will be returned.