Anonymous avatar Anonymous committed 0203c30

fine touching

Comments (0)

Files changed (1)

Usually/Resolve.cs

         {
             foreach (var j in this.GetJournals(refKey))
             {
-                var details = (j.Record is InsertRecord)
+                var records = (j.Record is InsertRecord)
                             ? this.ResolveForInsert(j)
                             : this.ResolveForStatic(j);
-                foreach (var t in details)
+                foreach (var t in records)
                 {
-                    if (t != j.Record) yield return t;
-                    else
-                    {
-                        var tt = t.CloneRecord();
-                        this.SetActualMasterKey(tt, actualKey);
-                        yield return tt;
-                    }
+                    if (t == j.Record) this.SetActualMasterKey(t, actualKey);
+                    yield return t;
                 }
             }
         }
         {
             foreach (var j in this.GetJournals(refKey))
             {
-                var details = Enumerable.Empty<TransactionRecord>();
+                var records = Enumerable.Empty<TransactionRecord>();
                 if (j.Record is InsertRecord) 
-                    details = this.ResolveForInsert(j);
+                    records = this.ResolveForInsert(j);
                 else if ((j.Record == null) || (j.Record is UpdateRecord)) 
-                    details = this.ResolveForStatic(j);
-                else if (j.Record is DeleteRecord) details = 
-                    details = this.ResolveForDelete(j);
-                foreach (var t in details) yield return t;
+                    records = this.ResolveForStatic(j);
+                else if (j.Record is DeleteRecord) records = 
+                    records = this.ResolveForDelete(j);
+                foreach (var t in records) yield return t;
             }
         }
         IEnumerable<TransactionRecord> IResolverItem.ResolveForMasterDelete(object[] refKey)
         {
             foreach (var j in this.GetJournals(refKey))
             {
-                var details = Enumerable.Empty<TransactionRecord>();
-                if (j.Record is DeleteRecord) details = this.ResolveForDelete(j);
+                var records = Enumerable.Empty<TransactionRecord>();
+                if (j.Record is DeleteRecord) records = this.ResolveForDelete(j);
                 else if ((j.Record == null) || (j.Record is UpdateRecord))
                 {
                     var del = new DeleteRecord(this.info.TableName);
                     this.info.ForEachKey(j.Old, del.Keys.Add);
                     var jdel = new TransactionJournal<T> { Record = del, Old = j.Old, New = default(T) };
-                    details = this.ResolveForDelete(jdel);
+                    records = this.ResolveForDelete(jdel);
                 }
-                foreach (var t in details) yield return t;
+                foreach (var t in records) yield return t;
             }
         }
         protected IEnumerable<TransactionRecord> ResolveForInsert(TransactionJournal<T> j)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.