示例#1
0
        public override int GetHashCode()
        {
            int hashcode = 157;

            unchecked {
                if (isset.objectName)
                {
                    hashcode = (hashcode * 397) + ObjectName.GetHashCode();
                }
                if (isset.objectType)
                {
                    hashcode = (hashcode * 397) + ObjectType.GetHashCode();
                }
                if (isset.privs)
                {
                    hashcode = (hashcode * 397) + TCollections.GetHashCode(Privs);
                }
                if (isset.grantee)
                {
                    hashcode = (hashcode * 397) + Grantee.GetHashCode();
                }
                if (isset.privilegeObjectType)
                {
                    hashcode = (hashcode * 397) + PrivilegeObjectType.GetHashCode();
                }
            }
            return(hashcode);
        }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = base.GetHashCode();
         hashCode = (hashCode * 397) ^ (_messages != null ? _messages.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Result != null ? Result.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ _timeOut;
         hashCode = (hashCode * 397) ^ IsObject.GetHashCode();
         hashCode = (hashCode * 397) ^ (ObjectName != null ? ObjectName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DisplayName != null ? DisplayName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ RabbitMQSourceResourceId.GetHashCode();
         hashCode = (hashCode * 397) ^ (QueueName != null ? QueueName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Response != null ? Response.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Prefetch != null ? Prefetch.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Acknowledge.GetHashCode();
         hashCode = (hashCode * 397) ^ (TimeOut != null ? TimeOut.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ ReQueue.GetHashCode();
         hashCode = (hashCode * 397) ^ (Consumer != null ? Consumer.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Connection != null ? Connection.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Channel != null ? Channel.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (RabbitSource != null ? RabbitSource.GetHashCode() : 0);
         return(hashCode);
     }
 }
示例#3
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked
     {
         return(((ObjectName != null ? ObjectName.GetHashCode() : 0) * 397) ^ (MaterialName != null ? MaterialName.GetHashCode() : 0));
     }
 }
示例#4
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((ObjectName?.GetHashCode() ?? 0) * 397) ^ (Location?.GetHashCode() ?? 0));
     }
 }
示例#5
0
#pragma warning disable S1541 // Methods and properties should not be too complex
        public override int GetHashCode()
#pragma warning restore S1541 // Methods and properties should not be too complex
        {
            unchecked
            {
                var hashCode = base.GetHashCode();
                hashCode = (hashCode * 397) ^ (_messages != null ? _messages.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Result != null ? Result.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ _timeOut;
                hashCode = (hashCode * 397) ^ IsObject.GetHashCode();
                hashCode = (hashCode * 397) ^ (ObjectName != null ? ObjectName.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (DisplayName != null ? DisplayName.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ RabbitMQSourceResourceId.GetHashCode();
                hashCode = (hashCode * 397) ^ (QueueName != null ? QueueName.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Response != null ? Response.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Prefetch != null ? Prefetch.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ Acknowledge.GetHashCode();
                hashCode = (hashCode * 397) ^ (TimeOut != null ? TimeOut.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ ReQueue.GetHashCode();
                hashCode = (hashCode * 397) ^ (Consumer != null ? Consumer.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Connection != null ? Connection.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Channel != null ? Channel.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (RabbitSource != null ? RabbitSource.GetHashCode() : 0);
                return(hashCode);
            }
        }
示例#6
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Type != 0)
            {
                hash ^= Type.GetHashCode();
            }
            if (ObjectName.Length != 0)
            {
                hash ^= ObjectName.GetHashCode();
            }
            if (SampleString.Length != 0)
            {
                hash ^= SampleString.GetHashCode();
            }
            if (SampleInt != 0)
            {
                hash ^= SampleInt.GetHashCode();
            }
            if (SampleFloat != 0F)
            {
                hash ^= SampleFloat.GetHashCode();
            }
            return(hash);
        }
示例#7
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Server != null ? Server.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ObjectName != null ? ObjectName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ObjectType != null ? ObjectType.GetHashCode() : 0);
         return(hashCode);
     }
 }
示例#8
0
        public override int GetHashCode()
        {
            var code = FullName.GetHashCode();

            for (int i = 0; i < MemberCount; i++)
            {
                var member = TypeInfo.MemberAt(i);

                code ^= member.GetHashCode();
            }

            return(code);
        }
        public override int GetHashCode()
        {
            int code = Callback.GetHashCode() ^ ObjectName.GetHashCode();

            if (_filterCallback != null)
            {
                code ^= _filterCallback.GetHashCode();
            }
            if (_handback != null)
            {
                code ^= _handback.GetHashCode();
            }
            return(code);
        }
示例#10
0
        /// <summary>
        /// Initalsies the tile, always run this, or this tile wont exist.
        /// </summary>
        public void Initalise()
        {
            LeakPercent = 100;                      // It is space, so it leaks 100% of the air there.
            Seed        = ObjectName.GetHashCode(); // This will get a random seed that isn't dependant on the system time as much since it is dependant on 1 centeral RNG (Right now. This will change.)
            Random Random = new Random(Seed);

            SpriteNumber       = Random.Next(NumberOfSprites);      // Choses what icon is used for this tile.
            SpriteState.Sprite = "Space" + SpriteNumber.ToString(); // Sets the sprite to that icon.
            ContentLoader.AddTexture("Space" + SpriteNumber, "Objects/Turf/Space/" + SpriteNumber);
            ZeroToThree          = Random.Next(4);
            SpriteState.Rotation = ZeroToThree * (float)1.57079633; // Creates 4 varations of each sprite by rotating them, reducing common patterns.


            OtherProperties.Remove("footheight");
            OtherProperties.Add("lackofobject");        // lackofobject means that the object in question is more of the lack of an object than an object itself.


            InitaliseTurf();  // Does things relating to turfs. Like makes you able to walk on them and see through them.
        }
示例#11
0
 public override int GetHashCode() =>
 unchecked (
     (ObjectName?.GetHashCode() ?? 0) +
     File?.GetHashCode() ?? 0);
示例#12
0
 public override int GetHashCode()
 {
     return(objectType.GetHashCode() +
            objectName.GetHashCode() +
            grantee.GetHashCode());
 }
示例#13
0
文件: ObjectSpec.cs 项目: ikvm/nesper
 /// <summary>
 /// Serves as a hash function for a particular type. <see cref="M:System.Object.GetHashCode"></see> is suitable for use in hashing algorithms and data structures like a hash table.
 /// </summary>
 /// <returns>
 /// A hash code for the current <see cref="T:System.Object"></see>.
 /// </returns>
 public override int GetHashCode()
 {
     return
         ((ObjectName.GetHashCode() * 397) +
          (ObjectNamespace.GetHashCode()));
 }
示例#14
0
 public override int GetHashCode()
 {
     return(BucketName.GetHashCode() + ObjectName.GetHashCode());
 }