Ejemplo n.º 1
0
        ///<summary>
        ///Determines whether the specified <see cref="T:System.Object"></see> is equal to the current <see cref="T:System.Object"></see>.
        ///</summary>
        ///
        ///<returns>
        ///true if the specified <see cref="T:System.Object"></see> is equal to the current <see cref="T:System.Object"></see>; otherwise, false.
        ///</returns>
        ///
        ///<param name="obj">The <see cref="T:System.Object"></see> to compare with the current <see cref="T:System.Object"></see>. </param><filterpriority>2</filterpriority>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            UIDefCol otherUIDefCol = obj as UIDefCol;

            if (otherUIDefCol == null)
            {
                return(false);
            }
            if (this.Count != otherUIDefCol.Count)
            {
                return(false);
            }
            foreach (IUIDef uiDef in this)
            {
                bool found = false;
                foreach (IUIDef otherUiDef in otherUIDefCol)
                {
                    if (otherUiDef.Equals(uiDef))
                    {
                        found = true;
                    }
                }
                if (!found)
                {
                    return(false);
                }
            }
            return(true);
        }
Ejemplo n.º 2
0
        ///<summary>
        /// Clones the uidefcol.  The new ui defCol will have a clone of each UIGrid and UIForm.
        ///  i.e. this is a deep copy of the uiDefCol
        ///</summary>
        ///<returns></returns>
        public UIDefCol Clone()
        {
            UIDefCol newUIDefCol = new UIDefCol();

            foreach (IUIDef def in this)
            {
                newUIDefCol.Add(def.Clone());
            }
            return(newUIDefCol);
        }
Ejemplo n.º 3
0
 ///<summary>
 ///</summary>
 ///<param name="assemblyName"></param>
 ///<param name="className"></param>
 ///<param name="displayName"></param>
 ///<param name="primaryKeyDef"></param>
 ///<param name="propDefCol"></param>
 ///<param name="keyDefCol"></param>
 ///<param name="relationshipDefCol"></param>
 ///<param name="uiDefCol"></param>
 ///<returns></returns>
 public IClassDef CreateClassDef(string assemblyName, string className, string displayName, IPrimaryKeyDef primaryKeyDef,
                                 IPropDefCol propDefCol, KeyDefCol keyDefCol, IRelationshipDefCol relationshipDefCol,
                                 UIDefCol uiDefCol)
 {
     return(new ClassDef(assemblyName, className, displayName, primaryKeyDef, propDefCol, keyDefCol, relationshipDefCol, uiDefCol));
 }