Esempio n. 1
0
        public void Freeze()
        {
            if (IsFrozen)
            {
                return;
            }
            IsFrozen = true;
            _fs.Freeze();
            if (_children != null)
            {
                _children.Freeze();
            }

            _hashCode = 23;
            _hashCode = _hashCode * 31 + _fs.GetFrozenHashCode();
            _hashCode = _hashCode * 31 + (_children == null ? 0 : _children.GetFrozenHashCode());
            _hashCode = _hashCode * 31 + _optional.GetHashCode();
            _hashCode = _hashCode * 31 + Range.GetHashCode();
        }
Esempio n. 2
0
        public void Freeze()
        {
            if (IsFrozen)
            {
                return;
            }

            IsFrozen = true;
            Begin.Freeze();
            int i = 0;

            foreach (ShapeNode node in this)
            {
                node.Tag = i++;
                node.Freeze();
            }
            End.Freeze();

            _annotations.Freeze();

            _hashCode = 23;
            _hashCode = _hashCode * 31 + Count;
            _hashCode = _hashCode * 31 + _annotations.GetFrozenHashCode();
        }