public void AddMatch(TInternal _internal, MatchStatus internalStatus, TExternal _external, MatchStatus externalStatus) { Matched.Add(new ManualMatchedPair <TInternal, TExternal>( this, new ManualMatchItem <TInternal>(_internal, internalStatus, InternalHandler), new ManualMatchItem <TExternal>(_external, externalStatus, ExternalHandler) )); }
void Sort <T>(Func <ManualMatchedPair <TInternal, TExternal>, T> sortKey) { var list = Matched.OrderBy(sortKey).ToList(); Matched.Clear(); foreach (var e in list) { Matched.Add(e); } }