Class RecipeUiOptionFactory
Builds and validates UiOptions from recipe option DTOs. Produces the flat fields (id, label, value/interaction type, a simple string default, translation flags); the option's submit signals are wired separately through ApplyOptionSignals(SerializedProperty, RecipeUiOptionDto[], List<string>) (they need the serialized property).
Inherited Members
Namespace: Serenity.ProjectRecipe.Infrastructure.Editor.Importers
Assembly: Serenity.UnityProjectRecipe.Infrastructure.Editor.dll
Syntax
public static class RecipeUiOptionFactory
Methods
Build(RecipeUiOptionDto[], string)
Builds a UiOption array (never null) from option DTOs for a given view id.
Declaration
public static UiOption[] Build(RecipeUiOptionDto[] options, string viewId)
Parameters
| Type | Name | Description |
|---|---|---|
| RecipeUiOptionDto[] | options | The option DTOs (may be null). |
| string | viewId | The owning view's id, stamped onto each option. |
Returns
| Type | Description |
|---|---|
| UiOption[] | The built options. |
ValidateOptions(SerenityRecipeImportContext, string, string, RecipeUiOptionDto[], bool)
Validates an option array for an owning view. Invalid enum names are reported as errors; submit signals
whose type cannot be resolved are reported as warnings (the option is still built without that signal).
Quiet (report false) when used as an import gate.
Declaration
public static bool ValidateOptions(SerenityRecipeImportContext context, string section, string ownerId, RecipeUiOptionDto[] options, bool report)
Parameters
| Type | Name | Description |
|---|---|---|
| SerenityRecipeImportContext | context | |
| string | section | |
| string | ownerId | |
| RecipeUiOptionDto[] | options | |
| bool | report |
Returns
| Type | Description |
|---|---|
| bool | True when every option is safe to build. |