コード例 #1
0
        public override int GetHashCode()
        {
            unchecked //ignore overflow
            {
                int hash = (int)2166136261;
                hash = base.GetHashCode();
                hash = hash * 16777619 ^ PrefetchSize.GetHashCode();
                hash = hash * 16777619 ^ StringComparer.OrdinalIgnoreCase.GetHashCode(Name ?? string.Empty);

                return(hash);
            }
        }
コード例 #2
0
        public override bool Equals(object obj)
        {
            var otherQueue = obj as ReadQueue;

            if (otherQueue == null)
            {
                return(false);
            }

            return(base.Equals(obj) &&
                   PrefetchSize.Equals(otherQueue.PrefetchSize) &&
                   Name.Equals(otherQueue.Name, StringComparison.OrdinalIgnoreCase));
        }