Class UniverseParentAttribute
- Namespace
- NominalSystems.Universe
- Assembly
- NominalSystems.Universe.dll
[Nominal] This attribute can be added to any Universe Object, or Universe Behaviour, that will specify which objects they can be attached to. If there is no Universe Parent, it will be able to attach to any object (within the domain). There can be many parent attributes added if required.
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class UniverseParentAttribute : Attribute, _Attribute
- Inheritance
-
UniverseParentAttribute
- Implements
Constructors
UniverseParentAttribute(Type)
Default constructor that sets up the parent type
public UniverseParentAttribute(Type parent)
Parameters
parent
TypeThe parent type
Properties
ParentType
Defines the parent type that is available for this particular class that has this attribute added.
public Type ParentType { get; }
Property Value
Methods
IsParentSupported(Type, Type)
Returns a flag whether the child type is supported by the parent type. This will compare two types and checks the universe parent attribute for if the types match and whether a child can be added correctly.
public static bool IsParentSupported(Type childType, Type ownerType)
Parameters
Returns
- bool
A supported type flag