static void ProcessContactAdd(N1mmXmlContactInfo ci) { if (!OnlyProcessOriginals || (OnlyProcessOriginals && ci.IsOriginal == "True")) { // True = contact was originated on this computer. Without this check, in a multiple n1mm scenario, // if this computer has All QSOs selected, we will receive the contact twice. We only want // the one from the PC on which the contact was logged. This does mean every n1mm instance // will need to be configured to send datagrams to us. That seems reasonable. Console.WriteLine($"Adding a contact: {ci.Call} / {ci.Operator}"); var contactRepo = new ContactDbRepo(pathToDb); ContactDbRow row = Mappers.Map(ci); contactRepo.Add(row); } else { Console.WriteLine($"Skipping a non-original contact: {ci.Call} / {ci.Operator}"); } }
static void ProcessContactReplace(N1mmXmlContactReplace cr) { if (cr.IsOriginal == "True") // True = contact was originated on this computer. Without this check, in a multiple n1mm scenario, { // if this computer has All QSOs selected, we will receive the contact twice. We only want // the one from the PC on which the contact was logged. This does mean every n1mm instance // will need to be configured to send datagrams to us. That seems reasonable. Console.WriteLine($"Replacing a contact: {cr.Call} / {cr.Operator}"); var contactRepo = new ContactDbRepo(pathToDb); DeleteContact(cr.Timestamp, cr.StationName); ContactDbRow row = Mappers.Map(cr); contactRepo.Add(row); } else { Console.WriteLine($"Skipping a replace (non-original): {cr.Call} / {cr.Operator}"); } }