Class AdoptedIdentityRules
The pure decision behind adoption's Id renaming: every cloned IFoundationSettings asset — a
collection member, a singleton, a prefab's identity-carrying component, all alike — gets a fresh,
project-local Id so it never collides with the shipped asset it was cloned from and is unambiguously a
NEW asset, never a shipped one re-saved. The CreateGame editor's own adoption-time reference remapper
(AdoptedReferenceRemapper) then re-points every reference the adopted set holds so this
renaming never stands alone.
Inheritance
AdoptedIdentityRules
Assembly: Serenity.Global.Application.dll
Syntax
public static class AdoptedIdentityRules
Methods
IsAdoptedId(string)
True when id already carries Serenity.Global.Application.References.AdoptedIdentityRules.AdoptedIdSuffix — a
clone this rule (or an earlier adoption run) already renamed.
Declaration
public static bool IsAdoptedId(string id)
Parameters
| Type |
Name |
Description |
| string |
id |
|
Returns
RenamedId(string)
The Id a renamed clone carries: originalId with Serenity.Global.Application.References.AdoptedIdentityRules.AdoptedIdSuffix
appended, unchanged when originalId is null/empty or already carries the suffix
(idempotent — re-planning an already-adopted asset must never double-suffix it).
Declaration
public static string RenamedId(string originalId)
Parameters
| Type |
Name |
Description |
| string |
originalId |
|
Returns