[init:] initialized new combine-functions

This commit is contained in:
Elias Fierke
2025-10-23 10:40:25 +02:00
parent f93d9aada8
commit 6efafb7cc2

View File

@@ -92,4 +92,68 @@ public class CombineAddresses
return first;
}
/// <summary>
/// Returns true if the addresses are the same.
/// </summary>
/// <param name="first">First address to compare</param>
/// <param name="second">Second address to compare</param>
/// <param name="only_refsid">If true, only a refsid-check will be done</param>
/// <returns></returns>
public bool CompareAddresses(KasPerson first, KasPerson second, bool only_refsid = false)
{
if (first.refsid == second.refsid) return true;
if (!only_refsid)
if (first.name == second.name &&
first.anrede == second.anrede &&
first.anredzus == second.anredzus &&
first.namezus == second.namezus &&
first.titel == second.titel &&
first.adel == second.adel &&
first.strasse == second.strasse &&
first.strasse2 == second.strasse2 &&
first.vorname == second.vorname &&
first.ort == second.ort &&
first.land == second.land &&
first.plz == second.plz &&
first.pplz == second.pplz &&
first.funktion == second.funktion &&
first.funktion2 == second.funktion2 &&
first.funktionad == second.funktionad &&
first.abteilung == second.abteilung &&
first.postfach == second.postfach &&
first.name1 == second.name1 &&
first.name2 == second.name2 &&
first.name3 == second.name3 &&
first.name4 == second.name4 &&
first.name5 == second.name5)
return true;
return false;
}
public async Task<KasAddressList> Difference()
{
return null;
}
public async Task<KasAddressList> Union()
{
return null;
}
public async Task<KasAddressList> MoveDuplicatesToNew()
{
return null;
}
public async Task<KasAddressList> Intersection()
{
return null;
}
public async Task<KasAddressList> SymmetricDifference()
{
return null;
}
}