コード例 #1
0
        private IAssetsFolder FindSnippetFolder(ISite site, IPage page, ref string snipLoc)
        {
            IAssetsFolder snippetsBaseFolder = null;

            if (snipLoc.StartsWith(SNIPPETS_FOLDER_PATH))
            {
                if (m_SnippetsFolder == null)
                {
                    throw new PluginUserMessageException("Snippets folder is not set");
                }

                snipLoc            = snipLoc.TrimStart(SNIPPETS_FOLDER_PATH);
                snippetsBaseFolder = m_SnippetsFolder;
            }
            else
            {
                snippetsBaseFolder = AssetsHelper.GetBaseFolder(site, page, PluginLocation.FromPath(snipLoc));
            }

            return(snippetsBaseFolder.FindFolder(PluginLocation.FromPath(snipLoc)));
        }