Ejemplo n.º 1
0
        public Exist(Exist another)
        {
            Oid refOid = null;
            QueryFormula refFormula = null;
            declare = new ArrayList();

            try
            {
                if (another.Oid != null)
                {
                    refOid = (Oid)another.Oid.Clone();
                }

                if (another.Declare != null)
                {
                    Declare[] items = (Declare[])another.Declare.Clone();
                    declare.Clear();
                    foreach (Declare item in items)
                    {
                        declare.Add(new Declare(item));
                    }
                }

                if (another.Formula != null)
                {
                    refFormula = (QueryFormula)another.Formula.Clone();
                }
            }
            catch (Exception e)
            {
                e.ToString();
            }

            oid = refOid;
            formula = refFormula;
        }
Ejemplo n.º 2
0
        public override bool Equals(object o)
        {
            if (o == null || GetType() != o.GetType())
            {
                return false;
            }

            Exist other = new Exist((Exist)o);

            if (this.oid != null)
            {
                if (!this.Oid.Equals(other.Oid))
                {
                    return false;
                }
            }

            if (!this.Formula.Equals(other.Formula))
            {
                return false;
            }

            for (int i = 0; i < Declare.Length; i++)
            {
                if (!Declare[i].Equals(other.Declare[i]))
                {
                    return false;
                }
            }

            return true;
        }