Example #1
0
        public override int GetHashCode()
        {
            int hash = ServiceType.GetHashCode() ^ FactoryType.GetHashCode();

            if (!string.IsNullOrEmpty(this.Name))
            {
                hash ^= Name.GetHashCode();
            }
            return(hash);
        }
Example #2
0
        public override int GetHashCode()
        {
            unchecked
            {
                if (IsAmbient)
                {
                    return(AmbientToken.GetHashCode());
                }

                var result = FactoryType.GetHashCode();
                result = (result * 397) ^ FacetType.GetHashCode();
                result = (result * 397) ^ FactoryData.GetHashCode();
                return(result);
            }
        }