예제 #1
0
        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);
        }
예제 #2
0
파일: GDMTree.cs 프로젝트: chipsi/gedkeeper
        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);
        }
예제 #3
0
 public void Test_GetSignByRecord()
 {
     Assert.AreEqual(string.Empty, GEDCOMUtils.GetSignByRecord(null));
 }