Пример #1
0
		private void AddToFieldSetters(DacReference reference, MergerRelationPair merger)
		{
			if (_fieldSetters.ContainsKey(reference.TargetField))
				_fieldSetters[reference.TargetField].Add(merger);
			else
				_fieldSetters.Add(reference.TargetField, new List<MergerRelationPair> { merger });

			if (_fieldSetters.ContainsKey(reference.ReferenceField))
				_fieldSetters[reference.ReferenceField].Add(merger);
			else
				_fieldSetters.Add(reference.ReferenceField, new List<MergerRelationPair> { merger });
		}
Пример #2
0
		private void AddRelationManager(Relation relation, IRelationManager merger)
		{
			AddToRecordRemappers(relation, merger);

			var mergeRelationPair = new MergerRelationPair {Manager = merger, Relation = relation};

			if (relation.Left != null)
				AddToFieldSetters(relation.Left, mergeRelationPair);

			if (relation.Right != null)
				AddToFieldSetters(relation.Right, mergeRelationPair);
		}
Пример #3
0
        private void AddRelationManager(Relation relation, IRelationManager merger)
        {
            AddToRecordRemappers(relation, merger);

            var mergeRelationPair = new MergerRelationPair {
                Manager = merger, Relation = relation
            };

            if (relation.Left != null)
            {
                AddToFieldSetters(relation.Left, mergeRelationPair);
            }

            if (relation.Right != null)
            {
                AddToFieldSetters(relation.Right, mergeRelationPair);
            }
        }
Пример #4
0
        private void AddToFieldSetters(DacReference reference, MergerRelationPair merger)
        {
            if (_fieldSetters.ContainsKey(reference.TargetField))
            {
                _fieldSetters[reference.TargetField].Add(merger);
            }
            else
            {
                _fieldSetters.Add(reference.TargetField, new List <MergerRelationPair> {
                    merger
                });
            }

            if (_fieldSetters.ContainsKey(reference.ReferenceField))
            {
                _fieldSetters[reference.ReferenceField].Add(merger);
            }
            else
            {
                _fieldSetters.Add(reference.ReferenceField, new List <MergerRelationPair> {
                    merger
                });
            }
        }