Class RecipeListOrder
The order rule every identity merge of a recipe list shares (a view's options, an option's submit signals): a recipe that lists every element of the list states the list's order, so that order is applied; a recipe that lists only some elements says nothing about where the others belong, so the list keeps its own order.
Inherited Members
Namespace: Serenity.ProjectRecipe.Infrastructure.Editor.Importers
Assembly: Serenity.UnityProjectRecipe.Infrastructure.Editor.dll
Syntax
public static class RecipeListOrder
Methods
IndicesAfterReorder(IReadOnlyList<int>, int[])
Where each recipe entry's element sits once the list takes order.
Declaration
public static int[] IndicesAfterReorder(IReadOnlyList<int> elementIndexByRecipeIndex, int[] order)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyList<int> | elementIndexByRecipeIndex | Each recipe entry's element index before the reorder. |
| int[] | order | The element indices in their new order. |
Returns
| Type | Description |
|---|---|
| int[] | Each recipe entry's element index after the reorder; negative indices are kept. |
TryGetRecipeOrder(IReadOnlyList<int>, int, out int[])
Reads the order a merged list takes from where each recipe entry landed.
Declaration
public static bool TryGetRecipeOrder(IReadOnlyList<int> elementIndexByRecipeIndex, int elementCount, out int[] order)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyList<int> | elementIndexByRecipeIndex | For each recipe entry, the index of the element it became; a negative index for an entry that became none. |
| int | elementCount | How many elements the merged list holds. |
| int[] | order | The element indices in the recipe's order, when the recipe placed every element. |
Returns
| Type | Description |
|---|---|
| bool | True when the recipe placed every element, so the list takes the recipe's order. |