コード例 #1
0
        public T GetData(string baseUrl, string url, string helpLinkBlock)
        {
            var helpCenterData = GetFromCacheOrFile(url);

            if (helpCenterData != null)
            {
                return(helpCenterData);
            }

            helpCenterData = new T {
                ResetCacheKey = ClientSettings.ResetCacheKey
            };
            var request = new HelpCenterRequest
            {
                Url           = url,
                BaseUrl       = baseUrl,
                HelpLinkBlock = helpLinkBlock,
                Starter       = (r, html) =>
                {
                    InitAndCacheData(r, html, helpCenterData);
                    HelpDownloader.Complete(url);
                }
            };

            HelpDownloader.Make(request);

            return(null);
        }
コード例 #2
0
        public T GetData(string baseUrl, string page, string helpLinkBlock)
        {
            var url            = baseUrl + page;
            var helpCenterData = GetFromCacheOrFile(url);

            if (helpCenterData != null)
            {
                return(helpCenterData);
            }

            var request = new HelpCenterRequest
            {
                Url           = url,
                BaseUrl       = baseUrl,
                HelpLinkBlock = helpLinkBlock
            };

            HelpDownloader.Make(request, (r, html) => InitAndCacheData(r, html, ClientSettings.ResetCacheKey));

            return(null);
        }