예제 #1
0
파일: NameMatcher.cs 프로젝트: jokalee/Tuto
 public NameMatch(MatchingPendingData <TInternal, TExternal> pendingData, MatchHandlers <TInternal, TExternal> handlers)
 {
     this.internals        = pendingData.Internals.ToArray();
     this.externals        = pendingData.Externals.ToArray();
     this.internalSelector = handlers.InternalHandler.Name;
     this.externalSelector = handlers.ExternalHandler.Name;
     result = new MatchDataContainer <TInternal, TExternal>(internals, externals);
 }
예제 #2
0
        public TwoDirectionalIdMatch(
            MatchingPendingData <TInternal, TExternal> pendingData,
            MatchKeySet <TInternal, TExternal, TInternalKey, TExternalKey> KeySet)
        {
            this.Internal      = pendingData.Internals.ToList();
            this.External      = pendingData.Externals.ToList();
            this.intToInt      = KeySet.IntToInt;
            this.intToExt      = KeySet.IntToExt;
            this.extToInt      = KeySet.ExtToInt;
            this.extToExt      = KeySet.ExtToExt;
            this.emptyExternal = KeySet.EmptyExternal;
            this.emptyInternal = KeySet.EmptyInternal;

            result = new MatchDataContainer <TInternal, TExternal>(Internal, External);
        }
예제 #3
0
 public void Pull(MatchDataContainer <TInternal, TExternal> dataContainer)
 {
     foreach (var e in dataContainer.Match)
     {
         AddMatch(e.Key, dataContainer.Internal[e.Key], e.Value, dataContainer.External[e.Value]);
     }
     foreach (var e in dataContainer.Internal.Where(z => z.Value == MatchStatus.Dirty))
     {
         AddInternalUnmatched(e.Key, e.Value);
     }
     foreach (var e in dataContainer.External.Where(z => z.Value == MatchStatus.Dirty))
     {
         AddExternalUnmatched(e.Key, e.Value);
     }
 }