private void onSuccess(APIWikiPage response) { wikiData.Value = response; if (response.Layout == index_path) { LoadDisplay(new WikiMainPage { Markdown = response.Markdown, Padding = new MarginPadding { Vertical = 20, Horizontal = 50, }, }); } else { LoadDisplay(new WikiMarkdownContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, CurrentPath = $@"{api.WebsiteRootUrl}/wiki/{path.Value}/", Text = response.Markdown, DocumentMargin = new MarginPadding(0), DocumentPadding = new MarginPadding { Vertical = 20, Left = 30, Right = 50, }, }); } }
private void setUpWikiResponse(APIWikiPage r, bool isFailed = false) => AddStep("set up response", () => { dummyAPI.HandleRequest = request => { if (!(request is GetWikiRequest getWikiRequest)) { return(false);
private void onSuccess(APIWikiPage response) { wikiData.Value = response; if (response.Layout == index_path) { LoadDisplay(new WikiMainPage { Markdown = response.Markdown, Padding = new MarginPadding { Vertical = 20, Horizontal = 50, }, }); } else { LoadDisplay(articlePage = new WikiArticlePage($@"{api.WebsiteRootUrl}/wiki/{path.Value}/", response.Markdown)); } }