public override IAuditWorkUnit Merge(FakeBidirectionalRelationWorkUnit second) { // First merging the nested work units. IAuditWorkUnit mergedNested = second.getNestedWorkUnit().Dispatch(nestedWorkUnit); // Now merging the fake relation changes from both work units. IDictionary <String, FakeRelationChange> secondFakeRelationChanges = second.getFakeRelationChanges(); IDictionary <String, FakeRelationChange> mergedFakeRelationChanges = new Dictionary <String, FakeRelationChange>(); //TODO Simon - decide if we use IESI.Collections in the end. ISet <String> allPropertyNames = new HashedSet <String>(fakeRelationChanges.Keys); allPropertyNames.AddAll(secondFakeRelationChanges.Keys); foreach (String propertyName in allPropertyNames) { mergedFakeRelationChanges.Add(propertyName, FakeRelationChange.Merge( fakeRelationChanges[propertyName], secondFakeRelationChanges[propertyName])); } return(new FakeBidirectionalRelationWorkUnit(this, mergedFakeRelationChanges, mergedNested)); }
public override IAuditWorkUnit Merge(FakeBidirectionalRelationWorkUnit second) { return(FakeBidirectionalRelationWorkUnit.merge(second, this, second.getNestedWorkUnit())); }
public override IAuditWorkUnit Merge(FakeBidirectionalRelationWorkUnit second) { return FakeBidirectionalRelationWorkUnit.merge(second, this, second.getNestedWorkUnit()); }
public override IAuditWorkUnit Merge(FakeBidirectionalRelationWorkUnit second) { // First merging the nested work units. IAuditWorkUnit mergedNested = second.getNestedWorkUnit().Dispatch(nestedWorkUnit); // Now merging the fake relation changes from both work units. IDictionary<String, FakeRelationChange> secondFakeRelationChanges = second.getFakeRelationChanges(); IDictionary<String, FakeRelationChange> mergedFakeRelationChanges = new Dictionary<String, FakeRelationChange>(); //TODO Simon - decide if we use IESI.Collections in the end. ISet<String> allPropertyNames = new HashedSet<String>(fakeRelationChanges.Keys); allPropertyNames.AddAll(secondFakeRelationChanges.Keys); foreach (String propertyName in allPropertyNames) { mergedFakeRelationChanges.Add(propertyName, FakeRelationChange.Merge( fakeRelationChanges[propertyName], secondFakeRelationChanges[propertyName])); } return new FakeBidirectionalRelationWorkUnit(this, mergedFakeRelationChanges, mergedNested); }