Class UnityEventDispatcherSignalDefinition
Unity ScriptableObject that defines which EventDispatcherSignal to dispatch and the
values of its constructor parameters, all configured from the Inspector.
The asset is passed to IEventDispatcherService.Dispatch(IEventDispatcherSignalDefinition),
which calls BuildSignal() and delivers the resulting signal to subscribers.
This authors a signal dispatch; it is not a replacement for
EventDispatcherAction<TSignal>, which is the code-defined reaction to a signal.
Namespace: Serenity.EventDispatcher.Infrastructure.Settings
Assembly: Serenity.UnityGlobal.Infrastructure.dll
Syntax
public class UnityEventDispatcherSignalDefinition : ScriptableObject, IFoundationSettings, IEventDispatcherSignalDefinition
Constructors
UnityEventDispatcherSignalDefinition()
Declaration
public UnityEventDispatcherSignalDefinition()
Fields
Guid
Declaration
public string Guid
Field Value
| Type | Description |
|---|---|
| string | Globally unique identifier (GUID) for this signal definition asset. |
Id
Declaration
public string Id
Field Value
| Type | Description |
|---|---|
| string | Unique identifier for this signal definition asset. |
Properties
ConstructorParamTypes
Gets or sets the selected constructor's parameter type names.
Declaration
public List<string> ConstructorParamTypes { get; set; }
Property Value
| Type | Description |
|---|---|
| List<string> |
Parameters
Gets or sets the configured constructor parameter values.
Declaration
public List<UnityConfiguredSignalParameter> Parameters { get; set; }
Property Value
| Type | Description |
|---|---|
| List<UnityConfiguredSignalParameter> |
SignalTypeName
Gets or sets the AssemblyQualifiedName of the signal type to dispatch.
Declaration
public string SignalTypeName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
BuildSignal()
Builds a fresh EventDispatcherSignal instance from the configured type, constructor and parameter values.
Declaration
public EventDispatcherSignal BuildSignal()
Returns
| Type | Description |
|---|---|
| EventDispatcherSignal | The constructed signal. |
Exceptions
| Type | Condition |
|---|---|
| UnityEventDispatcherSignalBuildException | Thrown when the configuration is invalid (missing/changed type or constructor, unsupported or unconvertible parameter, or a constructor that throws). |