示例#1
0
        private static Origin create(OriginId originId, ApplicationIcon applicationIcon, string displayName)
        {
            var source = new Origin(originId, applicationIcon, displayName);

            _allSources.Add(source);
            return(source);
        }
示例#2
0
        private static Origin create(OriginId originId, string iconName, string displayName)
        {
            var source = new Origin(originId, iconName, displayName);

            _allSources.Add(source);
            return(source);
        }
示例#3
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         hash = hash * 23 + OriginId.GetHashCode();
         hash = hash * 23 + RevIndex.GetHashCode();
         return(hash);
     }
 }
示例#4
0
        public override int GetHashCode()
        {
            var hashCode = -1610014636;

            hashCode = hashCode * -1521134295 + Id.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Name);

            hashCode = hashCode * -1521134295 + Time.GetHashCode();
            hashCode = hashCode * -1521134295 + Cost.GetHashCode();
            hashCode = hashCode * -1521134295 + OriginId.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <Point> .Default.GetHashCode(Origin);

            hashCode = hashCode * -1521134295 + DestinationId.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <Point> .Default.GetHashCode(Destination);

            return(hashCode);
        }
示例#5
0
        public int CompareTo(RevisionReference other)
        {
            int result = Time.CompareTo(other.Time);

            if (result != 0)
            {
                return(result);
            }

            result = OriginId.CompareTo(other.OriginId);
            if (result != 0)
            {
                return(result);
            }

            return(RevIndex.CompareTo(other.RevIndex));
        }
示例#6
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (OriginId != 0)
            {
                hash ^= OriginId.GetHashCode();
            }
            if (mapInfo_ != null)
            {
                hash ^= MapInfo.GetHashCode();
            }
            hash ^= quadInfos_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
示例#7
0
 internal Origin(OriginId id, ApplicationIcon icon, string displayName)
 {
     Id          = id;
     Icon        = icon;
     DisplayName = displayName;
 }
示例#8
0
 public static Origin ById(OriginId originId)
 {
     return(_allSources[originId]);
 }
示例#9
0
 public bool Equals(RevisionReference other)
 {
     return(OriginId.Equals(other.OriginId, StringComparison.InvariantCultureIgnoreCase) && RevIndex == other.RevIndex);
 }
示例#10
0
 internal Origin(OriginId id, string iconName, string displayName)
 {
     Id          = id;
     IconName    = iconName;
     DisplayName = displayName;
 }