MenuSchema¶
Namespace Nfty.Ticket in assembly Nfty.Ticket.
The Menu schema range this build can read and write — separate from Schema because a Menu is not a CookBook manifest and evolves on its own line.
Fields¶
Current¶
The schema version this build WRITES. It reads this and every earlier one — see MenuSchema.IsSupported().
Oldest¶
The oldest schema this build can read. A version below this is either a malformed manifest or a real, older Menu — schema 1, from before depth maps and the 2D-only (partialAlpha) flag existed — written by a build of nfty this one no longer reads. Both cases are refused the same way (see MenuSchema.IsSupported()); this build does not try to tell them apart, since neither is readable here.
Methods¶
IsSupported(int, int)¶
Whether version is readable by a build whose newest schema is current. current is a parameter rather than being read from MenuSchema.Current so the RANGE itself is testable. With Current == 1 the range 1..Current contains exactly one value, which makes "accepts older versions" indistinguishable from "demands exact equality" — a test written against the constant passes either way and proves nothing. Passing a hypothetical current lets the rule be pinned now, before there is a version 2 to try it on.
Parameters
version(int) - The version a Menu declares.current(int) - The newest version the reader supports.
Returns. Whether the reader can understand that version.