Exemplo n.º 1
0
        public ViewContent ViewContentVersion(string wikiname, int id, string slug,
            int version)
        {
            try
            {
                var viewData = new ViewContent { Content = repository.GetByVersion(wikiname,id, version) };

                return viewData;

            }
            catch (Exception ex)
            {

                CommonTools.ErrorReporting(ex);
                return null;
            }
        }
Exemplo n.º 2
0
        public ViewContent ViewContent(string wikiname, int id, string slug)
        {
            try
            {
                var viewData = new ViewContent { Content = this.repository.GetContent(wikiname,id) };

                viewData.Content.RenderedSource = wikiEngine.Render(viewData.Content.Source, GetRenderers(url));
                viewData.History =this.repository.GetHistory(id);
                viewData.Editable = IsEditable();

                return viewData;
            }
            catch (Exception ex)
            {

                CommonTools.ErrorReporting(ex);
                return null;
            }
        }