TeamMentor.CoreLib.TM_Xml_Database_ExtensionMethods_XmlDataSources_GuidanceExplorer.xmlDB_UpdateGuidanceExplorer C# (CSharp) Method

xmlDB_UpdateGuidanceExplorer() public static method

public static xmlDB_UpdateGuidanceExplorer ( this tmDatabase, System.Guid libraryId, string caption, bool deleteLibrary ) : bool
tmDatabase this
libraryId System.Guid
caption string
deleteLibrary bool
return bool
        public static bool xmlDB_UpdateGuidanceExplorer(this TM_Xml_Database tmDatabase, Guid libraryId, string caption, bool deleteLibrary)
        {
            //"[xmlDB_UpdateGuidanceExplorer]".info();
            if (TM_Xml_Database.Current.GuidanceExplorers_XmlFormat.hasKey(libraryId).isFalse())
            {
                "[TM_Xml_Database] in xmlDB_UpdateGuidanceExplorer, could not find library to update with id: {0}".error(libraryId);
                return false;
            }
            if (deleteLibrary)
            {
                return tmDatabase.xmlDB_DeleteGuidanceExplorer(libraryId);
            }

            var guidanceExplorerToUpdate = TM_Xml_Database.Current.GuidanceExplorers_XmlFormat[libraryId];

            // this is a rename
            if (guidanceExplorerToUpdate.library.caption != caption)
                return tmDatabase.xmlDB_RenameGuidanceExplorer(guidanceExplorerToUpdate, caption);
            return false;
        }

Same methods

TM_Xml_Database_ExtensionMethods_XmlDataSources_GuidanceExplorer::xmlDB_UpdateGuidanceExplorer ( this tmDatabase, Library library ) : bool