Axiom.Runtime.AbstractTerm.Dereference C# (CSharp) Method

Dereference() public method

Dereferences this object to the object it is assigned to.
public Dereference ( ) : AbstractTerm
return AbstractTerm
        public virtual AbstractTerm Dereference()
        {
            // in case we are wrapping a variable

            if (IsAssigned())
            {
                return _containee.Dereference();
            }

            return this;

            //if (_containee == null || _containee == this)
            //{
            //    return this;
            //}
            //else
            //{
            //    AbstractTerm reference = _containee;
            //    while (reference._containee != null)
            //    {
            //        _reference = _reference._containee;
            //    }
            //    return _reference;
            //}
            //return null;
        }

Usage Example

Esempio n. 1
0
        /// <summary>
        /// Dereferences this object to the object it is assigned to.
        /// </summary>
        /// <returns></returns>
        public virtual AbstractTerm Dereference()
        {
            // in case we are wrapping a variable

            if (IsAssigned())
            {
                return(_containee.Dereference());
            }

            return(this);

            //if (_containee == null || _containee == this)
            //{
            //    return this;
            //}
            //else
            //{
            //    AbstractTerm reference = _containee;
            //    while (reference._containee != null)
            //    {
            //        _reference = _reference._containee;
            //    }
            //    return _reference;
            //}
            //return null;
        }
All Usage Examples Of Axiom.Runtime.AbstractTerm::Dereference