logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class RecipeUiOptionMerger

    Meets a recipe's options with the options a menu or modal already owns, by identity rather than by position: a recipe option is matched to an existing one by its Guid, or by its Id when either side has no Guid. A matched option is edited in place — its binding, Guid and view id kept unless the recipe describes them — an existing option the recipe leaves out is left untouched, and a recipe option with no match is appended. No option is ever blanked because the lists are not the same length. A recipe that lists every option puts them in its order; one that lists only some keeps the view's order (RecipeListOrder). Every option the merge writes leaves with a Guid, so a blank one is filled on its first write. A recipe option is refused instead of written when it would give an option a Guid another option of the view already owns, or when its Guid matches nothing while its Id names an option that carries a Guid of its own no recipe option claims (RecipeIdentityConflict) — never appended as a second option of that Id.

    Inheritance
    object
    RecipeUiOptionMerger
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.ProjectRecipe.Infrastructure.Editor.Importers
    Assembly: Serenity.UnityProjectRecipe.Infrastructure.Editor.dll
    Syntax
    public sealed class RecipeUiOptionMerger

    Methods

    Merge(UiOption[], RecipeUiOptionDto[], string)

    Merges recipeOptions into existing.

    Declaration
    public static RecipeUiOptionMerge Merge(UiOption[] existing, RecipeUiOptionDto[] recipeOptions, string viewId)
    Parameters
    Type Name Description
    UiOption[] existing

    The options the view owns now (may be null); matched ones are edited in place.

    RecipeUiOptionDto[] recipeOptions

    The recipe's options (may be null: the view keeps its options).

    string viewId

    The view's id, stamped onto appended options and named in every conflict.

    Returns
    Type Description
    RecipeUiOptionMerge

    The merged options, where each recipe option landed, and the recipe options it refused.

    In this article
    © 2026 Serenity. All Rights Reserved