Example #1
0
 public void Add(AbstractChange change)
 {
     lock(locker) {
         if(this.isAdding) throw new CriticalException("Cannot add inside add");
         if(this.isProcessing || this.isProcessed) throw new CriticalException("ChangeSet is readonly");
         this.isAdding = true;
     }
     if(!this.changesByTable.ContainsKey(change.tableSpec.name)) throw new CriticalException("Table not supported");
     this.changesByTable[change.tableSpec.name].Add(change);
     this.isAdding = false;
     foreach(AbstractChange referencedChange in change.references) {
         this.Add(referencedChange);
     }
 }
		public TwoWayReferenceFieldValue(AbstractChange referenced, Calculator calculator)
			: base(referenced) {
			this.calculator = calculator;
		}
Example #3
0
 public ReferenceFieldValue(AbstractChange referenced)
 {
     this.referenced = referenced;
 }
Example #4
0
 private void ApplyToChange(Transaction transaction, AbstractChange change)
 {
     foreach(AbstractChange referenced in change.references) {
         if(!referenced.getId().HasValue) {
             this.ApplyToChange(transaction, referenced);
         }
     }
     change.Apply(transaction);
 }