Exemplo n.º 1
0
        /// <summary>
        /// Clona el objeto ColumnConstraint en una nueva instancia.
        /// </summary>
        public ColumnConstraint Clone(Column parent)
        {
            ColumnConstraint ccons = new ColumnConstraint(parent);

            ccons.Name       = this.Name;
            ccons.Type       = this.Type;
            ccons.Definition = this.Definition;
            ccons.Status     = this.Status;
            ccons.Disabled   = this.Disabled;
            ccons.Owner      = this.Owner;
            return(ccons);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Compara dos campos y devuelve true si son iguales, caso contrario, devuelve false.
 /// </summary>
 public static Boolean Compare(ColumnConstraint origin, ColumnConstraint destination)
 {
     if (destination == null)
     {
         throw new ArgumentNullException("destination");
     }
     if (origin == null)
     {
         throw new ArgumentNullException("origin");
     }
     if (origin.NotForReplication != destination.NotForReplication)
     {
         return(false);
     }
     if (origin.Disabled != destination.Disabled)
     {
         return(false);
     }
     if ((!origin.Definition.Equals(destination.Definition)) && (!origin.Definition.Equals("(" + destination.Definition + ")")))
     {
         return(false);
     }
     return(true);
 }