/// <summary> /// Determines whether the given version is within with the range. /// </summary> /// <param name="version">The version to test.</param> /// <returns>true if the version falls inside of the range; otherwise, false.</returns> public bool IsInRange(IDEVersion version) { if (!this.SinceBuild.IsValid && !this.UntilBuild.IsValid) { return(false); } if (!this.UntilBuild.IsValid) { return(version >= this.SinceBuild); } if (!this.SinceBuild.IsValid) { return(version < this.UntilBuild); } return(version >= this.SinceBuild && version < this.UntilBuild); }
public IDEVersionRange(IDEVersion sinceBuild, IDEVersion untilBuild) { this.SinceBuild = sinceBuild; this.UntilBuild = untilBuild; }