private static bool CheckRecordXRef(GDMRecord record) { string stdSign = GEDCOMUtils.GetSignByRecord(record); string xrefNum = record.GetXRefNum(); string recXRef = record.XRef; return((recXRef == stdSign + xrefNum) && record.GetId() >= 0); }
public string XRefIndex_NewXRef(GDMRecord record) { var invNFI = GEDCOMUtils.InvariantNumberFormatInfo; string sign = GEDCOMUtils.GetSignByRecord(record); string xref; int recType = (int)record.RecordType; int lastId = fLastIDs[recType]; do { lastId++; xref = sign + lastId.ToString(invNFI); } while (fXRefIndex.ContainsKey(xref)); fLastIDs[recType] = lastId; return(xref); }
public void Test_GetSignByRecord() { Assert.AreEqual(string.Empty, GEDCOMUtils.GetSignByRecord(null)); }