Class UnityShowModalComponentFactory
Factory class for creating Unity show modal UI components.
Handles instantiation of show modal components that listen for events and trigger modal dialogs.
Integrates with Unity GameObject system and provides component creation from parameters and actions.
Implements
Inherited Members
Namespace: Serenity.Modal.Infrastructure.Views.Factories
Assembly: Serenity.UnityModal.Infrastructure.dll
Syntax
public class UnityShowModalComponentFactory : IComponentFactory
Constructors
UnityShowModalComponentFactory()
Declaration
public UnityShowModalComponentFactory()
Methods
CreateComponent<Element, Parameters, Actions>(Parameters, Actions)
Creates a show modal UI component instance from the provided parameters and actions.
Instantiates a new GameObject and attaches a UnityShowModalComponent with the given configuration.
Validates component creation and ensures proper type casting before returning the element.
Declaration
public Element CreateComponent<Element, Parameters, Actions>(Parameters parameters, Actions actions) where Element : IFoundationViewElement where Parameters : IComponentParameters where Actions : IComponentActions
Parameters
| Type | Name | Description |
|---|---|---|
| Parameters | parameters | Configuration parameters for the show modal component. |
| Actions | actions | Actions that define component behavior. |
Returns
| Type | Description |
|---|---|
| Element | The created show modal component element. |
Type Parameters
| Name | Description |
|---|---|
| Element | The type of foundation view element to create. |
| Parameters | The type of component parameters. |
| Actions | The type of component actions. |
Exceptions
| Type | Condition |
|---|---|
| InvalidCastException | Thrown when GameObject doesn't contain the required component type. |