コード例 #1
0
        //--- Class Methods ---
        public static bool IsTierVersionCompatibleWithToolVersion(VersionInfo tierVersion, VersionInfo toolVersion)
        => toolVersion.IsPreRelease()

        // allow a tool pre-release, next version to be compatible with any previously deployed tier version
                ? tierVersion.GetMajorOnlyVersion().WithoutSuffix().IsEqualToVersion(toolVersion.GetMajorOnlyVersion().WithoutSuffix()) && tierVersion.IsLessOrEqualThanVersion(toolVersion)

        // tool major version must match tier major version
                : tierVersion.GetMajorOnlyVersion().IsEqualToVersion(toolVersion.GetMajorOnlyVersion());
コード例 #2
0
        public static int?CompareTierVersionToToolVersion(VersionInfo tierVersion, VersionInfo toolVersion)
        => (tierVersion.IsPreRelease() || toolVersion.IsPreRelease())

        // for pre-releases, we need the entire version information to determine ordering of versions
                ? tierVersion.CompareToVersion(toolVersion)

        // for stable releases, we only need the major version
                : tierVersion.GetMajorOnlyVersion().CompareToVersion(toolVersion.GetMajorOnlyVersion());
コード例 #3
0
 public static VersionInfo GetCoreServicesReferenceVersion(VersionInfo version)
 => version.GetMajorOnlyVersion();
コード例 #4
0
 public static bool IsModuleCoreVersionCompatibleWithTierVersion(VersionInfo moduleCoreVersion, VersionInfo tierVersion)
 => moduleCoreVersion.GetMajorOnlyVersion().IsEqualToVersion(tierVersion.GetMajorOnlyVersion());
コード例 #5
0
 public static bool IsModuleCoreVersionCompatibleWithToolVersion(VersionInfo moduleCoreVersion, VersionInfo toolVersion)
 => toolVersion.IsPreRelease()
         ? moduleCoreVersion.GetMajorOnlyVersion().WithoutSuffix().IsEqualToVersion(toolVersion.GetMajorOnlyVersion().WithoutSuffix()) && moduleCoreVersion.IsLessOrEqualThanVersion(toolVersion)
         : moduleCoreVersion.GetMajorOnlyVersion().IsEqualToVersion(toolVersion.GetMajorOnlyVersion());