Struct TypeParent
Gets a type's parent, that is, the entity that defines the type. A type parent can be either an assembly, another type, a method (for generic parameters only), or nothing at all.
Inherited Members
Namespace: Flame
Assembly: Flame.dll
Syntax
public struct TypeParent
Constructors
| Improve this Doc View SourceTypeParent(IAssembly)
Creates a type parent that wraps around an assembly.
Declaration
public TypeParent(IAssembly assembly)
Parameters
Type | Name | Description |
---|---|---|
IAssembly | assembly | The assembly that defines a type. |
TypeParent(IMethod)
Creates a type parent that wraps around a method.
Declaration
public TypeParent(IMethod method)
Parameters
Type | Name | Description |
---|---|---|
IMethod | method | The method that defines a type. |
TypeParent(IType)
Creates a type parent that wraps around a type.
Declaration
public TypeParent(IType type)
Parameters
Type | Name | Description |
---|---|---|
IType | type | The type that defines another type. |
Properties
| Improve this Doc View SourceAssembly
Gets the assembly that is this type parent. Throws if this type parent is not an assembly.
Declaration
public IAssembly Assembly { get; }
Property Value
Type | Description |
---|---|
IAssembly | An assembly. |
AssemblyOrNull
Gets the assembly that is this type parent. If this type
parent is not an assembly, then null
is returned.
Declaration
public IAssembly AssemblyOrNull { get; }
Property Value
Type | Description |
---|---|
IAssembly | An assembly or |
IsAssembly
Checks if this type parent is an assembly.
Declaration
public bool IsAssembly { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsMethod
Checks if this type parent is a method.
Declaration
public bool IsMethod { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsNothing
Checks if this type parent is nothing at all, that is, no entity directly "defines" the type.
Declaration
public bool IsNothing { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsType
Checks if this type parent is a type.
Declaration
public bool IsType { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Member
Gets the assembly, type or method that is this type parent. Throws if this type parent is not an assembly, type or method.
Declaration
public IMember Member { get; }
Property Value
Type | Description |
---|---|
IMember | A member. |
MemberOrNull
Gets the assembly, type or method that is this type parent
as a member. If this type parent is nothing, then null
is returned.
Declaration
public IMember MemberOrNull { get; }
Property Value
Type | Description |
---|---|
IMember | A member or |
Method
Gets the method that is this type parent. Throws if this type parent is not a method.
Declaration
public IMethod Method { get; }
Property Value
Type | Description |
---|---|
IMethod | A method. |
MethodOrNull
Gets the method that is this type parent. If this type
parent is not a method, then null
is returned.
Declaration
public IMethod MethodOrNull { get; }
Property Value
Type | Description |
---|---|
IMethod | A method or |
Nothing
Gets a type parent that indicates that a type has no parent.
Declaration
public static TypeParent Nothing { get; }
Property Value
Type | Description |
---|---|
TypeParent |
Type
Gets the type that is this type parent. Throws if this type parent is not a type.
Declaration
public IType Type { get; }
Property Value
Type | Description |
---|---|
IType | A type. |
TypeOrNull
Gets the type that is this type parent. If this type
parent is not a type, then null
is returned.
Declaration
public IType TypeOrNull { get; }
Property Value
Type | Description |
---|---|
IType | A type or |