Class ElementAdderMeta
Provides meta information which is useful when creating new implementations of the IElementAdderMenuBuilder<TContext> interface.
Namespace: Unity.VisualScripting.ReorderableList.Element_Adder_Menu
Syntax
public static class ElementAdderMeta
Methods
GetConcreteElementTypes(Type)
Gets an array of all the concrete element types that implement the specified
contractType
.
Declaration
public static Type[] GetConcreteElementTypes(Type contractType)
Parameters
Type | Name | Description |
---|---|---|
Type | contractType | Contract type of addable elements. |
Returns
Type | Description |
---|---|
Type[] | An array of zero or more concrete element types. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | If |
See Also
GetConcreteElementTypes(Type, Func<Type, Boolean>[])
Gets a filtered array of the concrete element types that implement the
specified contractType
.
Declaration
public static Type[] GetConcreteElementTypes(Type contractType, Func<Type, bool>[] filters)
Parameters
Type | Name | Description |
---|---|---|
Type | contractType | Contract type of addable elements. |
Func<Type, Boolean>[] | filters | An array of zero or more filters. |
Returns
Type | Description |
---|---|
Type[] | An array of zero or more concrete element types. |
Remarks
A type is excluded from the resulting array when one or more of the
specified filters
returns a value of false
.
Exceptions
Type | Condition |
---|---|
ArgumentNullException | If |
See Also
GetMenuCommands<TContext>(Type)
Gets an array of IElementAdderMenuCommand<TContext> instances
that are associated with the specified contractType
.
Declaration
public static IElementAdderMenuCommand<TContext>[] GetMenuCommands<TContext>(Type contractType)
Parameters
Type | Name | Description |
---|---|---|
Type | contractType | Contract type of addable elements. |
Returns
Type | Description |
---|---|
IElementAdderMenuCommand<TContext>[] | An array containing zero or more IElementAdderMenuCommand<TContext> instances. |
Type Parameters
Name | Description |
---|---|
TContext | Type of the context object that elements can be added to. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | If |
See Also
GetMenuCommandTypes<TContext>(Type)
Gets an array of the IElementAdderMenuCommand<TContext> types
that are associated with the specified contractType
.
Declaration
public static Type[] GetMenuCommandTypes<TContext>(Type contractType)
Parameters
Type | Name | Description |
---|---|---|
Type | contractType | Contract type of addable elements. |
Returns
Type | Description |
---|---|
Type[] | An array containing zero or more Type. |
Type Parameters
Name | Description |
---|---|
TContext | Type of the context object that elements can be added to. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | If |