Exemplo n.º 1
0
        [EditArticles]  public static bool xmlDB_Delete_GuidanceItem(this TM_Xml_Database tmDatabase, Guid guidanceItemId)
        {
            var guidanceItemXmlPath = tmDatabase.removeGuidanceItemFileMapping(guidanceItemId);

            "removing GuidanceItem with Id:{0} located at {1}".info(guidanceItemId, guidanceItemXmlPath);
            if (guidanceItemXmlPath.valid())
            {
                Files.deleteFile(guidanceItemXmlPath);
            }
            if (TM_Xml_Database.Current.Cached_GuidanceItems.hasKey(guidanceItemId))
            {
                TM_Xml_Database.Current.Cached_GuidanceItems.Remove(guidanceItemId);
            }

            tmDatabase.queue_Save_GuidanceItemsCache();

            //TM_Xml_Database.mapGuidanceItemsViews();
            return(true);
        }