You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Windows will be first to use it, but in a future CL, with toolchain separate from Windows SDK - Cleaned up some of the PlatformSDK API to have fewer public members (mainly so the functions that receive multiple versions can be automatically populated with the current single version functions in the subclasses) - Updated the Turnkey menu to handle multiple versions #jira none #rb david.harvey #preflight 62508cd8f10bcc0f4fa8b5d1 [CL 19692492 by Josh Adams in ue5-main branch]
63 lines
1.4 KiB
C#
63 lines
1.4 KiB
C#
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace UnrealBuildTool
|
|
{
|
|
/// <summary>
|
|
/// Range of version numbers
|
|
/// </summary>
|
|
class VersionNumberRange
|
|
{
|
|
/// <summary>
|
|
/// Minimum version number
|
|
/// </summary>
|
|
public VersionNumber Min { get; }
|
|
|
|
/// <summary>
|
|
/// Maximum version number
|
|
/// </summary>
|
|
public VersionNumber Max { get; }
|
|
|
|
/// <summary>
|
|
/// Constructor
|
|
/// </summary>
|
|
/// <param name="Min"></param>
|
|
/// <param name="Max"></param>
|
|
public VersionNumberRange(VersionNumber Min, VersionNumber Max)
|
|
{
|
|
this.Min = Min;
|
|
this.Max = Max;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Tests whether this range contains the given version
|
|
/// </summary>
|
|
/// <param name="Version"></param>
|
|
/// <returns></returns>
|
|
public bool Contains(VersionNumber Version)
|
|
{
|
|
return Version >= Min && Version <= Max;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Parse a version range from two strings
|
|
/// </summary>
|
|
/// <param name="MinText"></param>
|
|
/// <param name="MaxText"></param>
|
|
/// <returns></returns>
|
|
public static VersionNumberRange Parse(string MinText, string MaxText)
|
|
{
|
|
return new VersionNumberRange(VersionNumber.Parse(MinText), VersionNumber.Parse(MaxText));
|
|
}
|
|
|
|
/// <inheritdoc/>
|
|
public override string ToString()
|
|
{
|
|
return String.Format("{0}-{1}", Min, Max);
|
|
}
|
|
}
|
|
}
|