Class RecipeSerializedSnapshot
Every serialized leaf value of one object, keyed by its property path, taken at one moment. Two snapshots of the same object — before and after a recipe touched it — say exactly which fields changed, so a run reports "unchanged" only when the serialized data really is the same and writes nothing in that case.
Inherited Members
Namespace: Serenity.ProjectRecipe.Infrastructure.Editor
Assembly: Serenity.UnityProjectRecipe.Infrastructure.Editor.dll
Syntax
public sealed class RecipeSerializedSnapshot
Remarks
Managed references are compared by their concrete type and their data, never by their reference id: an importer that rebuilds an identical signal must not count as a change.
Methods
Capture(Object)
Reads every serialized leaf of target.
Declaration
public static RecipeSerializedSnapshot Capture(Object target)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | target | The object to read. |
Returns
| Type | Description |
|---|---|
| RecipeSerializedSnapshot | The snapshot. |
ChangedPathsTo(RecipeSerializedSnapshot)
The paths whose values differ between this snapshot and later, readable and
in ordinal order.
Declaration
public IReadOnlyList<string> ChangedPathsTo(RecipeSerializedSnapshot later)
Parameters
| Type | Name | Description |
|---|---|---|
| RecipeSerializedSnapshot | later | A later snapshot of the same object. |
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> | The changed paths; empty when nothing changed. |
IsBlankStringAt(string)
True when the leaf at path is a string that is empty or absent.
Declaration
public bool IsBlankStringAt(string path)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path | A readable path, as ChangedPathsTo(RecipeSerializedSnapshot) reports it. |
Returns
| Type | Description |
|---|---|
| bool |