Пример #1
0
        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);
        }
Пример #2
0
 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;
     }
 }
Пример #3
0
 public VersionComparator(Version version, VersionFloatBehavior floatBehavior, VersionOperator @operator)
     : this(version, floatBehavior, null, @operator)
 {
 }
Пример #4
0
 public VersionComparator(Version version, VersionFloatBehavior floatBehavior, string releasePrefix)
     : this(version, floatBehavior, releasePrefix, VersionOperator.Equal)
 {
 }
Пример #5
0
 public VersionComparator(Version version, VersionFloatBehavior floatBehavior)
     : this(version, floatBehavior, VersionOperator.Equal)
 {
 }