Пример #1
0
        public override bool Equals(object obj)
        {
            MDArrayTypeSignature other = obj as MDArrayTypeSignature;

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

            if (!Object.Equals(_arrayElementType, other._arrayElementType) ||
                _rank != other._rank ||
                _bounds.Length != other._bounds.Length ||
                _lowerBounds.Length != other._lowerBounds.Length)
            {
                return(false);
            }
            for (int i = 0; i < _bounds.Length; i++)
            {
                if (_bounds[i] != other._bounds[i])
                {
                    return(false);
                }
            }
            for (int i = 0; i < _lowerBounds.Length; i++)
            {
                if (_lowerBounds[i] != other._lowerBounds[i])
                {
                    return(false);
                }
            }

            return(true);
        }
Пример #2
0
        public Vertex GetMDArrayTypeSignature(Vertex elementType, uint rank, uint[] bounds, uint[] lowerBounds)
        {
            MDArrayTypeSignature sig = new MDArrayTypeSignature(elementType, rank, bounds, lowerBounds);

            return(Unify(sig));
        }