コード例 #1
0
        /// <summary>
        /// Returns TabId and ModuleId headers for a Page and Module to be passed in a Post WebApi call
        /// </summary>
        /// <param name="moduleFriendlyName">Module's friendly name, e.g. Wiki or Activity Stream</param>
        /// <param name="tabPath">double-slashed prefixed page name, e.g. //Home or //Groups//GroupSpaces//Members</param>
        /// <returns></returns>
        public static Dictionary <string, string> GetTabModuleHeaders(string moduleFriendlyName, string tabPath)
        {
            var tabId    = TabController.GetTabIdByPathName(tabPath);
            var moduleId = TabController.GetModuleIdInsidePage(tabId, moduleFriendlyName);

            return(new Dictionary <string, string>
            {
                { "TabID", tabId.ToString("D") },
                { "ModuleID", moduleId.ToString("D") },
            });
        }