/// <summary> /// Implements the logic for <see cref="LoadDocsCommand"/>. /// </summary> /// <param name="name">The name of the docs file to load.</param> private async Task LoadDocsAsync(string name) { // Skip if the loading has already started if (!(LoadDocsCommand.ExecutionTask is null)) { return; } var path = Path.Combine(FilesServices.InstallationPath, "Assets", "docs", $"{name}.md"); using var stream = await FilesServices.OpenForReadAsync(path); using var reader = new StreamReader(stream); var text = await reader.ReadToEndAsync(); texts = MarkdownHelper.GetParagraphs(text); OnPropertyChanged(nameof(GetParagraph)); }