Ejemplo n.º 1
0
        public Task <byte[]> GetContentAsync(string path)
        {
            path = ContentHelper.MappedUriPath(path);
            var data = ContentHelper.GetContent(_dbService, _logger, path, _keyValueStorage);

            return(Task.FromResult <byte []>(data));
        }
Ejemplo n.º 2
0
        public Task <string> GetStringContentAsync(string path)
        {
            path = ContentHelper.MappedUriPath(path);



            if (CommonUtility.IsServerSidePage(path))
            {
                var response = ServerPageModelHelper.ServerSidePageHandler(path, _dbService, _httpProxy, _viewEngine, _actionExecuter, _logger, _sessionProvider, _keyValueStorage);

                //var data = ContentHelper.GetStringContent(_dbService, _logger, path, _keyValueStorage);
                return(Task.FromResult <string>(response));
                // return response;
                // return Task.FromResult<string>($"In Progress :: {DateTime.Now.ToLongTimeString()}");
            }
            else
            {
                var data = ContentHelper.GetStringContent(_dbService, _logger, path, _keyValueStorage);
                return(Task.FromResult <string>(data));
            }
        }