Beispiel #1
0
 /// <summary>
 /// Compara dos triggers y devuelve true si son iguales, caso contrario, devuelve false.
 /// </summary>
 public static Boolean Compare(TableTrigger origen, TableTrigger destino)
 {
     if (destino == null)
     {
         throw new ArgumentNullException("destino");
     }
     if (origen == null)
     {
         throw new ArgumentNullException("origen");
     }
     if (!origen.Text.Equals(destino.Text))
     {
         return(false);
     }
     if (origen.InsteadOf != destino.InsteadOf)
     {
         return(false);
     }
     if (origen.IsDisabled != destino.IsDisabled)
     {
         return(false);
     }
     if (origen.NotForReplication != destino.NotForReplication)
     {
         return(false);
     }
     return(true);
 }
Beispiel #2
0
        /// <summary>
        /// Clona el objeto en una nueva instancia.
        /// </summary>
        public TableTrigger Clone(Table parent)
        {
            TableTrigger trigger = new TableTrigger(parent);

            trigger.Text              = this.Text;
            trigger.Status            = this.Status;
            trigger.Name              = this.Name;
            trigger.IsDisabled        = this.IsDisabled;
            trigger.InsteadOf         = this.InsteadOf;
            trigger.NotForReplication = this.NotForReplication;
            trigger.Owner             = this.Owner;
            trigger.Id = this.Id;
            return(trigger);
        }