示例#1
0
        private static bool Overlap(CustomSupportedVersion range1, CustomSupportedVersion range2)
        {
            Version version  = SupportedToolsData.GetVersion(range1.minTenantVersion, SupportedToolsData.MinimumVersion);
            Version version2 = SupportedToolsData.GetVersion(range1.maxTenantVersion, SupportedToolsData.MaximumVersion);
            Version version3 = SupportedToolsData.GetVersion(range2.minTenantVersion, SupportedToolsData.MinimumVersion);
            Version version4 = SupportedToolsData.GetVersion(range2.maxTenantVersion, SupportedToolsData.MaximumVersion);

            return(version2 >= version3 && version <= version4);
        }
示例#2
0
        private static bool IsInRange(CustomSupportedVersion versionInfo, Version tenantVersion)
        {
            if (versionInfo == null || tenantVersion == null)
            {
                return(false);
            }
            Version version  = SupportedToolsData.GetVersion(versionInfo.minTenantVersion, SupportedToolsData.MinimumVersion);
            Version version2 = SupportedToolsData.GetVersion(versionInfo.maxTenantVersion, SupportedToolsData.MaximumVersion);

            return(version2 >= tenantVersion && version <= tenantVersion);
        }
示例#3
0
 private static bool Overlap(CustomSupportedVersion newRange, IEnumerable <CustomSupportedVersion> existingRanges)
 {
     foreach (CustomSupportedVersion range in existingRanges)
     {
         if (SupportedToolsData.Overlap(newRange, range))
         {
             return(true);
         }
     }
     return(false);
 }