コード例 #1
0
ファイル: ChangeSet.cs プロジェクト: inga-lovinde/FLocal
 private void ApplyToChange(Transaction transaction, AbstractChange change)
 {
     foreach (AbstractChange referenced in change.references)
     {
         if (!referenced.getId().HasValue)
         {
             this.ApplyToChange(transaction, referenced);
         }
     }
     change.Apply(transaction);
 }
コード例 #2
0
ファイル: ChangeSet.cs プロジェクト: inga-lovinde/FLocal
 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);
     }
 }
コード例 #3
0
 public TwoWayReferenceFieldValue(AbstractChange referenced, Calculator calculator)
     : base(referenced)
 {
     this.calculator = calculator;
 }
コード例 #4
0
 public ReferenceFieldValue(AbstractChange referenced)
 {
     this.referenced = referenced;
 }