Class ProjectApiVersion
Carries the API version read from a project file's XML attribute
through the XFactory deserialization pipeline via the
object[] res parameter.
Consumers retrieve it with res?.OfType<ProjectApiVersion>().FirstOrDefault().
public class ProjectApiVersion
- Inheritance
-
ProjectApiVersion
- Inherited Members
- Extension Methods
Constructors
ProjectApiVersion(Version)
Initializes a new instance carrying the specified version.
public ProjectApiVersion(Version version)
Parameters
versionVersionAPI version read from the project XML; may be
nullwhen the source file did not record a version.
Properties
Version
API version stamped on the source project file at save time.
public Version Version { get; }
Property Value
Methods
IsOlderThan(Version)
Returns true if the source file was saved by an API version
older than version.
Returns false when the source version is unknown (null) — without
the explicit guard, Version's comparison
operator ranks a null left operand as OLDEST and every legacy
patch would fire on an unversioned file, contradicting this
contract that version-gated upgrades rely on.
public bool IsOlderThan(Version version)
Parameters
versionVersion