public override int GetHashCode() { int hashCode = MinVersion.GetHashCode(); hashCode = CombineHashCode(hashCode, VersionFloatBehavior.GetHashCode()); if (MaxVersion != null) { hashCode = CombineHashCode(hashCode, MaxVersion.GetHashCode()); } hashCode = CombineHashCode(hashCode, IsMaxInclusive.GetHashCode()); return(hashCode); }
public VersionComparator(Version version, VersionFloatBehavior floatBehavior, string releasePrefix, VersionOperator @operator) { if (version == null) { throw new ArgumentNullException(nameof(version)); } _version = version; _floatBehavior = floatBehavior; _releasePrefix = releasePrefix; _operator = @operator; if (_releasePrefix == null && version.IsPrerelease) { // use the actual label if one was not given _releasePrefix = version.Release; } }
public VersionComparator(Version version, VersionFloatBehavior floatBehavior, VersionOperator @operator) : this(version, floatBehavior, null, @operator) { }
public VersionComparator(Version version, VersionFloatBehavior floatBehavior, string releasePrefix) : this(version, floatBehavior, releasePrefix, VersionOperator.Equal) { }
public VersionComparator(Version version, VersionFloatBehavior floatBehavior) : this(version, floatBehavior, VersionOperator.Equal) { }