Ejemplo n.º 1
0
        public static void SetFolder(GDMRecord record, string value)
        {
            if (!HasFolderSupport(record.RecordType))
            {
                return;
            }

            var folderTag = record.FindTag(GEDCOMTagName._FOLDER, 0);

            if (!string.IsNullOrEmpty(value))
            {
                if (folderTag == null)
                {
                    record.AddTag(new GDMValueTag((int)GEDCOMTagType._FOLDER, value));
                }
                else
                {
                    folderTag.StringValue = value;
                }
            }
            else
            {
                if (folderTag != null)
                {
                    record.DeleteTag(GEDCOMTagName._FOLDER);
                }
            }
        }
Ejemplo n.º 2
0
        public static string GetFolder(GDMRecord record)
        {
            var folderTag = record.FindTag(GEDCOMTagName._FOLDER, 0);

            return((folderTag == null) ? "" : folderTag.StringValue);
        }