Class SerenityShippedSnapshotImportWatcher
Re-triggers the cleanup when a Serenity package update lands in an editor where the cleaner is already
resident: importing a new package brings a new ShippedAssetsSnapshot.json, and reacting to its
import lets the update self-apply (sweep + restore) without a manual editor restart. Also maintains the
package-import correlation record Serenity.Editor.ObsoleteAssetCleaner.SerenityObsoleteAssetCleaner.ClassifySweep(System.Collections.Generic.IReadOnlyList{System.String},System.Collections.Generic.IReadOnlyCollection{System.String},System.Func{System.String,System.Boolean},System.Func{System.String,System.Boolean}) uses to tell
apart a stale-snapshot suspect (a file THIS import just wrote that the manifest omits) from an ordinary
previous-version leftover: every non-meta file this watcher sees imported under an owned root, for the
batch that brings the snapshot, is recorded alongside the snapshot's fingerprint. The record has a
two-phase lifecycle: PENDING while postprocess batches for the current import are still landing (any of
them can append — see Serenity.Editor.ObsoleteAssetCleaner.SerenityShippedSnapshotImportWatcher.AppendToImportRecordIfPending(System.String[])), then CONSUMED the moment a cleanup
pass actually reads it for classification (see Serenity.Editor.ObsoleteAssetCleaner.SerenityShippedSnapshotImportWatcher.TryLoadValidatedImportRecordPaths(System.String)), after
which it is frozen until the next snapshot import overwrites it wholesale — so an unrelated asset import
that happens to land under an owned root AFTER the cleanup pass already ran can never silently grow a
record that was already classified against.
Namespace: Serenity.Editor.ObsoleteAssetCleaner
Assembly: Serenity.ObsoleteAssetCleaner.Editor.dll
Syntax
public sealed class SerenityShippedSnapshotImportWatcher : AssetPostprocessor
Constructors
SerenityShippedSnapshotImportWatcher()
Declaration
public SerenityShippedSnapshotImportWatcher()