From 959506dc5a170d6ebbb17de091f680595e29a037 Mon Sep 17 00:00:00 2001 From: Yufei Huang Date: Thu, 21 Sep 2023 17:26:39 +0800 Subject: [PATCH 1/9] feat: initial support of markdown output --- .../seed/dotnet/solution/CatLibrary/Class1.cs | 4 +- src/Docfx.Dotnet/DotnetApiCatalog.cs | 1 + .../ExtractMetadata/ExtractMetadataConfig.cs | 2 + .../ExtractMetadata/ExtractMetadataWorker.cs | 6 + src/Docfx.Dotnet/MarkdownFormatter.cs | 524 ++++++++++++++++++ src/Docfx.Dotnet/MetadataJsonConfig.cs | 22 + src/Docfx.Dotnet/SymbolFormatter.cs | 4 +- src/Docfx.Dotnet/SymbolHelper.cs | 52 ++ src/Docfx.Dotnet/SymbolUrlResolver.cs | 23 +- src/docfx/Models/MetadataCommand.cs | 3 +- src/docfx/Models/MetadataCommandOptions.cs | 4 + test/docfx.Snapshot.Tests/SamplesTest.cs | 27 +- 12 files changed, 653 insertions(+), 19 deletions(-) create mode 100644 src/Docfx.Dotnet/MarkdownFormatter.cs diff --git a/samples/seed/dotnet/solution/CatLibrary/Class1.cs b/samples/seed/dotnet/solution/CatLibrary/Class1.cs index 775ebb71a05..66ddeb31e50 100644 --- a/samples/seed/dotnet/solution/CatLibrary/Class1.cs +++ b/samples/seed/dotnet/solution/CatLibrary/Class1.cs @@ -177,8 +177,8 @@ public void Jump(T ownType, K anotherOwnType, ref bool cheat) /// /// Addition operator of this class. /// - /// ... - /// ~~~ + /// .. + /// ~~ /// Result with int type. public static int operator +(Cat lsr, int rsr) { return 1; } diff --git a/src/Docfx.Dotnet/DotnetApiCatalog.cs b/src/Docfx.Dotnet/DotnetApiCatalog.cs index 03814d4750a..1db7dbff8be 100644 --- a/src/Docfx.Dotnet/DotnetApiCatalog.cs +++ b/src/Docfx.Dotnet/DotnetApiCatalog.cs @@ -119,6 +119,7 @@ private static ExtractMetadataConfig ConvertConfig(MetadataJsonItemConfig config IncludePrivateMembers = configModel?.IncludePrivateMembers ?? false, GlobalNamespaceId = configModel?.GlobalNamespaceId, MSBuildProperties = configModel?.MSBuildProperties, + OutputFormat = configModel?.OutputFormat ?? default, OutputFolder = Path.GetFullPath(Path.Combine(outputDirectory, outputFolder)), CodeSourceBasePath = configModel?.CodeSourceBasePath, DisableDefaultFilter = configModel?.DisableDefaultFilter ?? false, diff --git a/src/Docfx.Dotnet/ExtractMetadata/ExtractMetadataConfig.cs b/src/Docfx.Dotnet/ExtractMetadata/ExtractMetadataConfig.cs index 5a04e5ea4d4..70e0aa53de8 100644 --- a/src/Docfx.Dotnet/ExtractMetadata/ExtractMetadataConfig.cs +++ b/src/Docfx.Dotnet/ExtractMetadata/ExtractMetadataConfig.cs @@ -11,6 +11,8 @@ internal class ExtractMetadataConfig public string OutputFolder { get; init; } + public MetadataOutputFormat OutputFormat { get; init; } + public bool ShouldSkipMarkup { get; init; } public string FilterConfigFile { get; init; } diff --git a/src/Docfx.Dotnet/ExtractMetadata/ExtractMetadataWorker.cs b/src/Docfx.Dotnet/ExtractMetadata/ExtractMetadataWorker.cs index 9a088c07049..1f2c99d79ec 100644 --- a/src/Docfx.Dotnet/ExtractMetadata/ExtractMetadataWorker.cs +++ b/src/Docfx.Dotnet/ExtractMetadata/ExtractMetadataWorker.cs @@ -138,6 +138,12 @@ await LoadCompilationFromProject(project.AbsolutePath) is { } compilation) return; } + if (_config.OutputFormat is MetadataOutputFormat.Markdown) + { + MarkdownFormatter.Save(assemblies, _config, _options); + return; + } + var projectMetadataList = new List(); var extensionMethods = assemblies.SelectMany(assembly => assembly.Item1.FindExtensionMethods()).ToArray(); var filter = new SymbolFilter(_config, _options); diff --git a/src/Docfx.Dotnet/MarkdownFormatter.cs b/src/Docfx.Dotnet/MarkdownFormatter.cs new file mode 100644 index 00000000000..99e0e2547c5 --- /dev/null +++ b/src/Docfx.Dotnet/MarkdownFormatter.cs @@ -0,0 +1,524 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Text; +using Docfx.Common; +using Docfx.DataContracts.ManagedReference; +using Docfx.Plugins; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.Shared.Extensions; + +#nullable enable + +namespace Docfx.Dotnet; + +static class MarkdownFormatter +{ + public static void Save(List<(IAssemblySymbol, Compilation)> assemblies, ExtractMetadataConfig config, DotnetApiOptions options) + { + Logger.LogWarning($"Markdown output format is experimental."); + + Directory.CreateDirectory(config.OutputFolder); + + var filter = new SymbolFilter(config, options); + var extensionMethods = assemblies.SelectMany(assembly => assembly.Item1.FindExtensionMethods()).Where(filter.IncludeApi).ToArray(); + var allAssemblies = new HashSet(assemblies.Select(a => a.Item1), SymbolEqualityComparer.Default); + var allTypes = allAssemblies.SelectMany(a => a.GlobalNamespace.GetAllTypes(default).Where(filter.IncludeApi)).ToArray(); + + foreach (var (assembly, compilation) in assemblies) + { + SaveCore(assembly, compilation); + } + + void SaveCore(IAssemblySymbol assembly, Compilation compilation) + { + Logger.LogInfo($"Processing {assembly.Name}"); + VisitNamespace(assembly.GlobalNamespace); + + void VisitNamespace(INamespaceSymbol symbol) + { + if (!filter.IncludeApi(symbol)) + return; + + foreach (var ns in symbol.GetNamespaceMembers()) + VisitNamespace(ns); + + foreach (var type in symbol.GetTypeMembers()) + VisitNamedType(type); + } + + void VisitNamedType(INamedTypeSymbol symbol) + { + if (!filter.IncludeApi(symbol)) + return; + + foreach (var subtype in symbol.GetTypeMembers()) + VisitNamedType(subtype); + + Save(symbol); + } + + void Save(INamedTypeSymbol symbol) + { + var sb = new StringBuilder(); + var comment = Comment(symbol); + + switch (symbol.TypeKind) + { + case TypeKind.Enum: Enum(); break; + case TypeKind.Delegate: Delegate(); break; + case TypeKind.Interface or TypeKind.Structure or TypeKind.Class: Class(); break; + } + + var filename = Path.Combine(config.OutputFolder, VisitorHelper.GetId(symbol) + ".md"); + File.WriteAllText(filename, sb.ToString()); + + void Enum() + { + sb.AppendLine($"# Enum {Escape(symbol.Name)}").AppendLine(); + + Info(); + Summary(comment); + Syntax(symbol); + + EnumFields(); + + Examples(comment); + Remarks(comment); + SeeAlsos(comment); + } + + void Delegate() + { + sb.AppendLine($"# Delegate {Escape(symbol.Name)}").AppendLine(); + + Info(); + Summary(comment); + Syntax(symbol); + + var invokeMethod = symbol.DelegateInvokeMethod!; + Parameters(invokeMethod, comment); + Returns(invokeMethod, comment); + TypeParameters(invokeMethod.ContainingType, comment); + + Examples(comment); + Remarks(comment); + SeeAlsos(comment); + } + + void Class() + { + var typeHeader = symbol.TypeKind switch + { + TypeKind.Interface => "Interface", + TypeKind.Class => "Class", + TypeKind.Struct => "Struct", + _ => throw new InvalidOperationException(), + }; + + sb.AppendLine($"# {typeHeader} {Escape(symbol.Name)}").AppendLine(); + + Info(); + Summary(comment); + Syntax(symbol); + + TypeParameters(symbol, comment); + Inheritance(); + Derived(); + Implements(); + InheritedMembers(); + ExtensionMethods(); + + Examples(comment); + Remarks(comment); + + Methods(SymbolHelper.IsConstructor, "Constructors"); + Fields(); + Properties(); + Methods(SymbolHelper.IsMethod, "Methods"); + Events(); + Methods(SymbolHelper.IsOperator, "Operators"); + + SeeAlsos(comment); + } + + void Inheritance() + { + var items = new List(); + for (var type = symbol; type != null; type = type.BaseType) + items.Add(type); + + if (items.Count <= 1) + return; + + items.Reverse(); + sb.AppendLine($"#### Inheritance"); + sb.AppendLine(string.Join(" \u2190 ", items.Select(i => "\n" + FullLink(i)))).AppendLine(); + } + + void Derived() + { + var items = allTypes + .Where(t => SymbolEqualityComparer.Default.Equals(t.BaseType, symbol)) + .OrderBy(t => t.Name).ToList(); + + if (items.Count is 0) + return; + + sb.AppendLine($"#### Derived"); + sb.AppendLine(string.Join(", ", items.Select(i => "\n" + FullLink(i)))).AppendLine(); + } + + void Implements() + { + var items = symbol.AllInterfaces.Where(filter.IncludeApi).ToList(); + if (items.Count is 0) + return; + + sb.AppendLine($"#### Implements"); + sb.AppendLine(string.Join(", ", items.Select(i => "\n" + FullLink(i)))).AppendLine(); + } + + void InheritedMembers() + { + var items = symbol.GetInheritedMembers(filter).ToList(); + if (items.Count is 0) + return; + + // TODO: + sb.AppendLine($"#### Inherited Members"); + sb.AppendLine(string.Join(", ", items.Select(i => "\n" + ShortLink(i)))).AppendLine(); + } + + void ExtensionMethods() + { + var items = extensionMethods + .Where(m => m.Language == symbol.Language) + .Select(m => m.ReduceExtensionMethod(symbol)) + .OfType() + .OrderBy(i => i.Name) + .ToList(); + + if (items.Count is 0) + return; + + sb.AppendLine($"#### Extension Methods"); + sb.AppendLine(string.Join(", ", items.Select(i => "\n" + ShortLink(i)))).AppendLine(); + } + + void Parameters(ISymbol symbol, XmlComment? comment, string heading = "##") + { + var parameters = symbol.GetParameters(); + if (!parameters.Any()) + return; + + sb.AppendLine($"{heading} Parameters").AppendLine(); + + foreach (var param in parameters) + { + sb.AppendLine($"`{Escape(param.Name)}` {FullLink(param.Type)}").AppendLine(); + + if (comment?.Parameters?.TryGetValue(param.Name, out var value) ?? false) + sb.AppendLine($"{value}").AppendLine(); + } + } + + void Returns(IMethodSymbol symbol, XmlComment? comment, string heading = "##") + { + if (symbol.ReturnType is null || symbol.ReturnType.SpecialType is SpecialType.System_Void) + return; + + sb.AppendLine($"{heading} Returns").AppendLine(); + sb.AppendLine(FullLink(symbol.ReturnType)).AppendLine(); + + if (!string.IsNullOrEmpty(comment?.Returns)) + sb.AppendLine($"{comment.Returns}").AppendLine(); + } + + void TypeParameters(ISymbol symbol, XmlComment? comment, string heading = "##") + { + if (symbol.GetTypeParameters() is { } typeParameters && typeParameters.Length is 0) + return; + + sb.AppendLine($"{heading} Type Parameters").AppendLine(); + + foreach (var param in typeParameters) + { + sb.AppendLine($"`{Escape(param.Name)}`").AppendLine(); + + if (comment?.TypeParameters?.TryGetValue(param.Name, out var value) ?? false) + sb.AppendLine($"{value}").AppendLine(); + } + } + + void Methods(Func predicate, string headingText) + { + var items = symbol.GetMembers().OfType().Where(filter.IncludeApi) + .Where(predicate).OrderBy(m => m.Name).ToList(); + + if (!items.Any()) + return; + + sb.AppendLine($"## {headingText}").AppendLine(); + + foreach (var item in items) + Method(item); + + void Method(IMethodSymbol symbol) + { + sb.AppendLine($"### {Escape(SymbolFormatter.GetName(symbol, SyntaxLanguage.CSharp))}").AppendLine(); + + var comment = Comment(symbol); + Summary(comment); + Syntax(symbol); + + Parameters(symbol, comment, "####"); + Returns(symbol, comment, "####"); + TypeParameters(symbol, comment, "####"); + + Examples(comment, "####"); + Remarks(comment, "####"); + Exceptions(comment, "####"); + SeeAlsos(comment, "####"); + } + } + + void Fields() + { + var items = symbol.GetMembers().OfType().Where(filter.IncludeApi).OrderBy(m => m.Name).ToList(); + if (!items.Any()) + return; + + sb.AppendLine($"## Fields").AppendLine(); + + foreach (var item in items) + Field(item); + + void Field(IFieldSymbol symbol) + { + sb.AppendLine($"### {Escape(SymbolFormatter.GetName(symbol, SyntaxLanguage.CSharp))}").AppendLine(); + + var comment = Comment(symbol); + Summary(comment); + Syntax(symbol); + + sb.AppendLine("Field Value").AppendLine(); + sb.AppendLine(FullLink(symbol.Type)).AppendLine(); + + Examples(comment, "####"); + Remarks(comment, "####"); + Exceptions(comment, "####"); + SeeAlsos(comment, "####"); + } + } + + void Properties() + { + var items = symbol.GetMembers().OfType().Where(filter.IncludeApi).OrderBy(m => m.Name).ToList(); + if (!items.Any()) + return; + + sb.AppendLine($"## Properties").AppendLine(); + + foreach (var item in items) + Property(item); + + void Property(IPropertySymbol symbol) + { + sb.AppendLine($"### {Escape(SymbolFormatter.GetName(symbol, SyntaxLanguage.CSharp))}").AppendLine(); + + var comment = Comment(symbol); + Summary(comment); + Syntax(symbol); + + sb.AppendLine("Property Value").AppendLine(); + sb.AppendLine(FullLink(symbol.Type)).AppendLine(); + + Examples(comment, "####"); + Remarks(comment, "####"); + Exceptions(comment, "####"); + SeeAlsos(comment, "####"); + } + } + + void Events() + { + var items = symbol.GetMembers().OfType().Where(filter.IncludeApi).OrderBy(m => m.Name).ToList(); + if (!items.Any()) + return; + + sb.AppendLine($"## Events").AppendLine(); + + foreach (var item in items) + Event(item); + + void Event(IEventSymbol symbol) + { + sb.AppendLine($"### {Escape(SymbolFormatter.GetName(symbol, SyntaxLanguage.CSharp))}").AppendLine(); + + var comment = Comment(symbol); + Summary(comment); + Syntax(symbol); + + sb.AppendLine("Event Type").AppendLine(); + sb.AppendLine(FullLink(symbol.Type)).AppendLine(); + + Examples(comment, "####"); + Remarks(comment, "####"); + Exceptions(comment, "####"); + SeeAlsos(comment, "####"); + } + } + + void EnumFields() + { + var items = symbol.GetMembers().OfType().Where(filter.IncludeApi).ToList(); + if (!items.Any()) + return; + + if (config.EnumSortOrder is EnumSortOrder.Alphabetic) + items = items.OrderBy(m => m.Name).ToList(); + + sb.AppendLine($"## Fields").AppendLine(); + + foreach (var item in items) + { + sb.AppendLine($"### `{Escape(item.Name)} = {item.ConstantValue}`").AppendLine(); + + if (Comment(item) is { } comment) + sb.AppendLine($"{Escape(comment.Summary)}").AppendLine(); + } + } + + void Info() + { + sb.AppendLine($"_Namespace:_ {FullLink(symbol.ContainingNamespace)}"); + sb.AppendLine($"_Assembly:_ {symbol.ContainingAssembly.Name}.dll").AppendLine(); + } + + void Summary(XmlComment? comment) + { + if (!string.IsNullOrEmpty(comment?.Summary)) + sb.AppendLine(comment.Summary).AppendLine(); + } + + void Syntax(ISymbol symbol) + { + var syntax = SymbolFormatter.GetSyntax(symbol, SyntaxLanguage.CSharp, filter); + sb.AppendLine("```csharp").AppendLine(syntax).AppendLine("```").AppendLine(); + } + + void Examples(XmlComment? comment, string heading = "##") + { + if (comment?.Examples?.Count > 0) + { + sb.AppendLine($"{heading} Examples").AppendLine(); + + foreach (var example in comment.Examples) + sb.AppendLine(example).AppendLine(); + } + } + + void Remarks(XmlComment? comment, string heading = "##") + { + if (!string.IsNullOrEmpty(comment?.Remarks)) + { + sb.AppendLine($"{heading} Remarks").AppendLine(); + sb.AppendLine(comment.Remarks).AppendLine(); + } + } + + void Exceptions(XmlComment? comment, string heading = "##") + { + if (comment?.Exceptions?.Count > 0) + { + sb.AppendLine($"{heading} Exceptions").AppendLine(); + + foreach (var exception in comment.Exceptions) + { + sb.AppendLine(Cref(exception.CommentId)).AppendLine(); + sb.AppendLine(exception.Description).AppendLine(); + } + } + } + + void SeeAlsos(XmlComment? comment, string heading = "##") + { + if (comment?.SeeAlsos?.Count > 0) + { + sb.AppendLine($"{heading} See Also").AppendLine(); + + foreach (var seealso in comment.SeeAlsos) + { + var content = seealso.LinkType switch + { + LinkType.CRef => Cref(seealso.CommentId), + LinkType.HRef => $"<{Escape(seealso.LinkId)}>", + _ => throw new NotSupportedException($"{seealso.LinkType}"), + }; + sb.AppendLine(content).AppendLine(); + } + } + } + } + + string FullLink(ISymbol symbol) + { + var parts = SymbolFormatter.GetNameWithTypeParts(symbol, SyntaxLanguage.CSharp); + var linkItems = SymbolFormatter.ToLinkItems(parts, compilation, config.MemberLayout, allAssemblies, overload: false, SymbolUrlKind.Markdown); + + return string.Concat(linkItems.Select(i => + string.IsNullOrEmpty(i.Href) ? Escape(i.DisplayName) : $"[{Escape(i.DisplayName)}]({Escape(i.Href)})")); + } + + string ShortLink(ISymbol symbol) + { + var title = SymbolFormatter.GetNameWithType(symbol, SyntaxLanguage.CSharp); + var url = SymbolUrlResolver.GetSymbolUrl(symbol, compilation, config.MemberLayout, SymbolUrlKind.Markdown, allAssemblies); + return string.IsNullOrEmpty(url) ? Escape(title) : $"[{Escape(title)}]({Escape(url)})"; + } + + string Cref(string commentId) + { + return DocumentationCommentId.GetFirstSymbolForDeclarationId(commentId, compilation) is { } symbol ? FullLink(symbol) : ""; + } + + XmlComment? Comment(ISymbol symbol) + { + var src = VisitorHelper.GetSourceDetail(symbol, compilation); + var context = new XmlCommentParserContext + { + SkipMarkup = config.ShouldSkipMarkup, + AddReferenceDelegate = (a, b) => { }, + Source = src, + ResolveCode = ResolveCode, + }; + + var comment = symbol.GetDocumentationComment(compilation, expandIncludes: true, expandInheritdoc: true); + return XmlComment.Parse(comment.FullXmlFragment, context); + + string? ResolveCode(string source) + { + var basePath = config.CodeSourceBasePath ?? ( + src?.Path is { } sourcePath + ? Path.GetDirectoryName(Path.GetFullPath(Path.Combine(EnvironmentContext.BaseDirectory, sourcePath))) + : null); + + var path = Path.GetFullPath(Path.Combine(basePath ?? "", source)); + if (!File.Exists(path)) + { + Logger.LogWarning($"Source file '{path}' not found."); + return null; + } + + return File.ReadAllText(path); + } + } + } + + static string Escape(string text) + { + return text; + } + } +} diff --git a/src/Docfx.Dotnet/MetadataJsonConfig.cs b/src/Docfx.Dotnet/MetadataJsonConfig.cs index b45fcd02667..bc0f031c354 100644 --- a/src/Docfx.Dotnet/MetadataJsonConfig.cs +++ b/src/Docfx.Dotnet/MetadataJsonConfig.cs @@ -53,6 +53,22 @@ internal enum EnumSortOrder DeclaringOrder } +/// +/// Specifies the output file format. +/// +internal enum MetadataOutputFormat +{ + /// + /// Output as ManagedReference YAML files + /// + MrefYaml, + + /// + /// Output as common-mark compliant markdown file + /// + Markdown, +} + /// /// MetadataJsonItemConfig. /// @@ -71,6 +87,12 @@ internal class MetadataJsonItemConfig [JsonProperty("dest")] public string Destination { get; set; } + /// + /// Defines the output file format. + /// + [JsonProperty("outputFormat")] + public MetadataOutputFormat OutputFormat { get; set; } + /// /// If set to true, DocFX would not render triple-slash-comments in source code as markdown. /// diff --git a/src/Docfx.Dotnet/SymbolFormatter.cs b/src/Docfx.Dotnet/SymbolFormatter.cs index 2ca5a487f4d..79d57bfbda8 100644 --- a/src/Docfx.Dotnet/SymbolFormatter.cs +++ b/src/Docfx.Dotnet/SymbolFormatter.cs @@ -108,7 +108,7 @@ public static ImmutableArray GetSyntaxParts(ISymbol symbol, S } public static List ToLinkItems(this ImmutableArray parts, - Compilation compilation, MemberLayout memberLayout, HashSet allAssemblies, bool overload) + Compilation compilation, MemberLayout memberLayout, HashSet allAssemblies, bool overload, SymbolUrlKind urlKind = SymbolUrlKind.Html) { var result = new List(); foreach (var part in parts) @@ -133,7 +133,7 @@ LinkItem ToLinkItem(SymbolDisplayPart part) { Name = overload ? VisitorHelper.GetOverloadId(symbol) : VisitorHelper.GetId(symbol), DisplayName = part.ToString(), - Href = SymbolUrlResolver.GetSymbolUrl(symbol, compilation, memberLayout, allAssemblies), + Href = SymbolUrlResolver.GetSymbolUrl(symbol, compilation, memberLayout, urlKind, allAssemblies), IsExternalPath = symbol.IsExtern || symbol.DeclaringSyntaxReferences.Length == 0, }; } diff --git a/src/Docfx.Dotnet/SymbolHelper.cs b/src/Docfx.Dotnet/SymbolHelper.cs index 56ba58e5a21..46545e67364 100644 --- a/src/Docfx.Dotnet/SymbolHelper.cs +++ b/src/Docfx.Dotnet/SymbolHelper.cs @@ -1,4 +1,5 @@ using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.Shared.Extensions; #nullable enable @@ -59,6 +60,28 @@ public static bool HasOverloads(this ISymbol symbol) m => m.Kind is SymbolKind.Method && !ReferenceEquals(m, symbol) && m.Name == symbol.Name); } + public static bool IsConstructor(IMethodSymbol method) + { + return method.MethodKind is MethodKind.Constructor or MethodKind.StaticConstructor; + } + + public static bool IsMethod(IMethodSymbol method) + { + return method.MethodKind + is MethodKind.AnonymousFunction + or MethodKind.DelegateInvoke + or MethodKind.Destructor + or MethodKind.ExplicitInterfaceImplementation + or MethodKind.Ordinary + or MethodKind.ReducedExtension + or MethodKind.DeclareMethod; + } + + public static bool IsOperator(IMethodSymbol method) + { + return method.MethodKind is MethodKind.BuiltinOperator or MethodKind.UserDefinedOperator or MethodKind.Conversion; + } + public static IEnumerable FindExtensionMethods(this IAssemblySymbol assembly) { if (!assembly.MightContainExtensionMethods) @@ -86,4 +109,33 @@ public static IEnumerable GetAllNamespaces(this IAssemblySymbo } } } + + public static IEnumerable GetInheritedMembers(this INamedTypeSymbol symbol, SymbolFilter filter) + { + for (var type = symbol.BaseType; type != null; type = type.BaseType) + { + foreach (var m in from m in type.GetMembers() + where m is not INamedTypeSymbol + where filter.IncludeApi(m) + where m.DeclaredAccessibility is Accessibility.Public || !(symbol.IsSealed || symbol.TypeKind is TypeKind.Struct) + where IsInheritable(m) + select m) + { + yield return m; + } + } + + static bool IsInheritable(ISymbol memberSymbol) + { + if (memberSymbol is IMethodSymbol { } method) + { + return method.MethodKind switch + { + MethodKind.ExplicitInterfaceImplementation or MethodKind.DeclareMethod or MethodKind.Ordinary => true, + _ => false, + }; + } + return true; + } + } } diff --git a/src/Docfx.Dotnet/SymbolUrlResolver.cs b/src/Docfx.Dotnet/SymbolUrlResolver.cs index d1dae4cb54f..979862cd941 100644 --- a/src/Docfx.Dotnet/SymbolUrlResolver.cs +++ b/src/Docfx.Dotnet/SymbolUrlResolver.cs @@ -5,16 +5,22 @@ namespace Docfx.Dotnet; +enum SymbolUrlKind +{ + Html, + Markdown, +} + internal static partial class SymbolUrlResolver { - public static string? GetSymbolUrl(ISymbol symbol, Compilation compilation, MemberLayout memberLayout, HashSet allAssemblies) + public static string? GetSymbolUrl(ISymbol symbol, Compilation compilation, MemberLayout memberLayout, SymbolUrlKind urlKind, HashSet allAssemblies) { - return GetDocfxUrl(symbol, memberLayout, allAssemblies) + return GetDocfxUrl(symbol, memberLayout, urlKind, allAssemblies) ?? GetMicrosoftLearnUrl(symbol) ?? GetPdbSourceLinkUrl(compilation, symbol); } - internal static string? GetDocfxUrl(ISymbol symbol, MemberLayout memberLayout, HashSet allAssemblies) + internal static string? GetDocfxUrl(ISymbol symbol, MemberLayout memberLayout, SymbolUrlKind urlKind, HashSet allAssemblies) { if (symbol.ContainingAssembly is null || !allAssemblies.Contains(symbol.ContainingAssembly)) return null; @@ -26,14 +32,19 @@ internal static partial class SymbolUrlResolver var parts = commentId.Split(':'); var type = parts[0]; var uid = parts[1]; + var ext = urlKind switch + { + SymbolUrlKind.Markdown => ".md", + _ => ".html", + }; return type switch { "!" => null, - "N" or "T" => $"{uid.Replace('`', '-')}.html", + "N" or "T" => $"{uid.Replace('`', '-')}{ext}", "M" or "F" or "P" or "E" => memberLayout is MemberLayout.SeparatePages && !symbol.IsEnumMember() - ? $"{VisitorHelper.GetId(symbol).Replace('`', '-')}.html" - : $"{VisitorHelper.GetId(symbol.ContainingType).Replace('`', '-')}.html#{Regex.Replace(uid, @"/\W/", "_")}", + ? $"{VisitorHelper.GetId(symbol).Replace('`', '-')}{ext}" + : $"{VisitorHelper.GetId(symbol.ContainingType).Replace('`', '-')}{ext}#{Regex.Replace(uid, @"/\W/", "_")}", _ => throw new NotSupportedException($"Unknown comment ID format '{type}'"), }; } diff --git a/src/docfx/Models/MetadataCommand.cs b/src/docfx/Models/MetadataCommand.cs index 113f1a3cb70..639f7615b58 100644 --- a/src/docfx/Models/MetadataCommand.cs +++ b/src/docfx/Models/MetadataCommand.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics.CodeAnalysis; -using Docfx.DataContracts.Common; using Docfx.Dotnet; using Newtonsoft.Json; using Spectre.Console.Cli; @@ -51,6 +50,8 @@ private static MetadataJsonConfig ParseOptions(MetadataCommandOptions options, o item.DisableGitFeatures |= options.DisableGitFeatures; item.DisableDefaultFilter |= options.DisableDefaultFilter; item.NamespaceLayout = options.NamespaceLayout ?? item.NamespaceLayout; + item.OutputFormat = options.OutputFormat ?? item.OutputFormat; + if (!string.IsNullOrEmpty(options.FilterConfigFile)) { item.FilterConfigFile = Path.GetFullPath(options.FilterConfigFile); diff --git a/src/docfx/Models/MetadataCommandOptions.cs b/src/docfx/Models/MetadataCommandOptions.cs index ac116621a8c..cfa5ee2f8b1 100644 --- a/src/docfx/Models/MetadataCommandOptions.cs +++ b/src/docfx/Models/MetadataCommandOptions.cs @@ -17,6 +17,10 @@ internal class MetadataCommandOptions : LogOptions [CommandOption("-o|--output")] public string OutputFolder { get; set; } + [Description("Specify the output type")] + [CommandOption("--outputFormat")] + public MetadataOutputFormat? OutputFormat { get; set; } + [Description("Path to docfx.json")] [CommandArgument(0, "[config]")] public string Config { get; set; } diff --git a/test/docfx.Snapshot.Tests/SamplesTest.cs b/test/docfx.Snapshot.Tests/SamplesTest.cs index df2a04d53ae..7a6dd941a7b 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.cs +++ b/test/docfx.Snapshot.Tests/SamplesTest.cs @@ -76,7 +76,7 @@ public async Task Seed() Assert.Equal(0, Exec(docfxPath, $"build {samplePath}/docfx.json")); } - await Verifier.VerifyDirectory($"{samplePath}/_site", IncludeFile, fileScrubber: ScrubFile).AutoVerify(includeBuildServer: false); + await VerifyDirectory($"{samplePath}/_site", IncludeFile, fileScrubber: ScrubFile).AutoVerify(includeBuildServer: false); } [SnapshotFact] @@ -142,16 +142,16 @@ await s_viewports.ForEachInParallelAsync(async viewport => if (theme is "light" && htmlUrls.TryAdd(url, url)) { var html = await page.ContentAsync(); - await Verifier - .Verify(new Target("html", NormalizeHtml(html))) + await + Verify(new Target("html", NormalizeHtml(html))) .UseDirectory($"{nameof(SamplesTest)}.{nameof(SeedHtml)}/html") .UseFileName(fileName) .AutoVerify(includeBuildServer: false); } var bytes = await page.ScreenshotAsync(new() { FullPage = fullPage }); - await Verifier - .Verify(new Target("png", new MemoryStream(bytes))) + await + Verify(new Target("png", new MemoryStream(bytes))) .UseStreamComparer((received, verified, _) => CompareImage(received, verified, directory, fileName)) .UseDirectory(directory) .UseFileName(fileName) @@ -181,6 +181,17 @@ static string NormalizeHtml(string html) } } + [SnapshotFact] + public async Task SeedMarkdown() + { + var samplePath = $"{s_samplesDir}/seed"; + Clean(samplePath); + + Program.Main(new[] { "metadata", $"{samplePath}/docfx.json", "--outputFormat", "markdown" }); + + await VerifyDirectory($"{samplePath}/_site", IncludeFile, fileScrubber: ScrubFile).AutoVerify(includeBuildServer: false); + } + [SnapshotFact] public async Task CSharp() { @@ -199,7 +210,7 @@ public async Task CSharp() Environment.SetEnvironmentVariable("DOCFX_SOURCE_BRANCH_NAME", null); } - await Verifier.VerifyDirectory($"{samplePath}/_site", IncludeFile).AutoVerify(includeBuildServer: false); + await VerifyDirectory($"{samplePath}/_site", IncludeFile).AutoVerify(includeBuildServer: false); } [SnapshotFact] @@ -214,7 +225,7 @@ public Task Extensions() Assert.Equal(0, Exec("dotnet", "run --no-build -c Release --project build", workingDirectory: samplePath)); #endif - return Verifier.VerifyDirectory($"{samplePath}/_site", IncludeFile).AutoVerify(includeBuildServer: false); + return VerifyDirectory($"{samplePath}/_site", IncludeFile).AutoVerify(includeBuildServer: false); } private static int Exec(string filename, string args, string workingDirectory = null) @@ -242,7 +253,7 @@ private static bool IncludeFile(string file) return Path.GetExtension(file) switch { ".json" => Path.GetFileName(file) != "manifest.json", - ".yml" => true, + ".yml" or ".md" => true, _ => false, }; } From e491edf2783608628d3241c5564f589cecda22b3 Mon Sep 17 00:00:00 2001 From: Yufei Huang Date: Thu, 21 Sep 2023 17:42:42 +0800 Subject: [PATCH 2/9] Fix tests --- .../BuildFromAssembly.Class1.verified.md | 44 +++ ...ildFromCSharpSourceCode.CSharp.verified.md | 36 ++ ...dFromProject.Class1.IIssue8948.verified.md | 25 ++ ...ldFromProject.Class1.Issue8665.verified.md | 100 +++++ ...ject.Class1.Issue8696Attribute.verified.md | 85 +++++ ...ldFromProject.Class1.Issue8948.verified.md | 44 +++ ...BuildFromProject.Class1.Test`1.verified.md | 28 ++ .../BuildFromProject.Class1.verified.md | 203 +++++++++++ .../BuildFromProject.IInheritdoc.verified.md | 19 + ....Inheritdoc.Issue6366.Class1`1.verified.md | 54 +++ ...ct.Inheritdoc.Issue6366.Class2.verified.md | 52 +++ ...omProject.Inheritdoc.Issue6366.verified.md | 24 ++ ...omProject.Inheritdoc.Issue7035.verified.md | 38 ++ ...omProject.Inheritdoc.Issue7484.verified.md | 86 +++++ ...omProject.Inheritdoc.Issue8101.verified.md | 90 +++++ ...omProject.Inheritdoc.Issue8129.verified.md | 39 ++ .../BuildFromProject.Inheritdoc.verified.md | 55 +++ ...BuildFromProject.Issue8540.A.A.verified.md | 24 ++ ...BuildFromProject.Issue8540.B.B.verified.md | 24 ++ ...ildFromVBSourceCode.BaseClass1.verified.md | 47 +++ .../BuildFromVBSourceCode.Class1.verified.md | 96 +++++ .../CatLibrary.CatException`1.verified.md | 46 +++ .../CatLibrary.Cat`2.verified.md | 345 ++++++++++++++++++ .../CatLibrary.Complex`2.verified.md | 30 ++ ...re.ContainersRefType.ColorType.verified.md | 25 ++ ...RefType.ContainersRefTypeChild.verified.md | 24 ++ ...ontainersRefTypeChildInterface.verified.md | 9 + ...Type.ContainersRefTypeDelegate.verified.md | 11 + ...Library.Core.ContainersRefType.verified.md | 93 +++++ ...brary.Core.ExplicitLayoutClass.verified.md | 24 ++ .../CatLibrary.Core.Issue231.verified.md | 36 ++ .../CatLibrary.FakeDelegate`1.verified.md | 37 ++ .../CatLibrary.IAnimal.verified.md | 81 ++++ .../CatLibrary.ICat.verified.md | 34 ++ .../CatLibrary.ICatExtension.verified.md | 66 ++++ .../CatLibrary.MRefDelegate`3.verified.md | 39 ++ .../CatLibrary.MRefNormalDelegate.verified.md | 21 ++ .../CatLibrary.Tom.verified.md | 70 ++++ .../CatLibrary.TomFromBaseClass.verified.md | 44 +++ ...Ref.Demo.Enumeration.ColorType.verified.md | 36 ++ test/docfx.Snapshot.Tests/SamplesTest.cs | 4 +- 41 files changed, 2286 insertions(+), 2 deletions(-) create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromAssembly.Class1.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromCSharpSourceCode.CSharp.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.IIssue8948.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8665.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8696Attribute.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8948.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Test`1.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.IInheritdoc.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class1`1.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class2.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7035.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7484.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8101.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8129.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.A.A.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.B.B.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.BaseClass1.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.Class1.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.CatException`1.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Cat`2.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Complex`2.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ColorType.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChild.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChildInterface.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeDelegate.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ExplicitLayoutClass.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.Issue231.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.FakeDelegate`1.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.IAnimal.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICat.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICatExtension.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefDelegate`3.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefNormalDelegate.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Tom.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.TomFromBaseClass.verified.md create mode 100644 test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/MRef.Demo.Enumeration.ColorType.verified.md diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromAssembly.Class1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromAssembly.Class1.verified.md new file mode 100644 index 00000000000..123999da330 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromAssembly.Class1.verified.md @@ -0,0 +1,44 @@ +# Class Class1 + +_Namespace:_ [BuildFromAssembly](BuildFromAssembly.md) +_Assembly:_ BuildFromAssembly.dll + +This is a test class. + +```csharp +public class Class1 +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[Class1](BuildFromAssembly.Class1.md) + +#### Inherited Members + +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring), +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) + +## Constructors + +### Class1() + +```csharp +public Class1() +``` + +## Methods + +### HelloWorld() + +Hello World. + +```csharp +public static void HelloWorld() +``` + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromCSharpSourceCode.CSharp.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromCSharpSourceCode.CSharp.verified.md new file mode 100644 index 00000000000..b566fd62445 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromCSharpSourceCode.CSharp.verified.md @@ -0,0 +1,36 @@ +# Class CSharp + +_Namespace:_ [BuildFromCSharpSourceCode](BuildFromCSharpSourceCode.md) +_Assembly:_ ?.dll + +```csharp +public class CSharp +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[CSharp](BuildFromCSharpSourceCode.CSharp.md) + +#### Inherited Members + +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + +## Methods + +### Main(string[]) + +```csharp +public static void Main(string[] args) +``` + +#### Parameters + +`args` [string](https://learn.microsoft.com/dotnet/api/system.string)[] + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.IIssue8948.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.IIssue8948.verified.md new file mode 100644 index 00000000000..1afefce79c2 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.IIssue8948.verified.md @@ -0,0 +1,25 @@ +# Interface IIssue8948 + +_Namespace:_ [BuildFromProject](BuildFromProject.md) +_Assembly:_ BuildFromProject.dll + +```csharp +public interface Class1.IIssue8948 +``` + +## Methods + +### DoNothing() + +Does nothing with generic type T. + +```csharp +void DoNothing() +``` + +#### Type Parameters + +`T` + +A generic type. + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8665.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8665.verified.md new file mode 100644 index 00000000000..3515b326dd6 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8665.verified.md @@ -0,0 +1,100 @@ +# Class Issue8665 + +_Namespace:_ [BuildFromProject](BuildFromProject.md) +_Assembly:_ BuildFromProject.dll + +```csharp +public class Class1.Issue8665 +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[Class1](BuildFromProject.Class1.md).[Issue8665](BuildFromProject.Class1.Issue8665.md) + +#### Inherited Members + +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + +## Constructors + +### Issue8665() + +```csharp +public Issue8665() +``` + +### Issue8665(int) + +```csharp +public Issue8665(int foo) +``` + +#### Parameters + +`foo` [int](https://learn.microsoft.com/dotnet/api/system.int32) + +### Issue8665(int, char) + +```csharp +public Issue8665(int foo, char bar) +``` + +#### Parameters + +`foo` [int](https://learn.microsoft.com/dotnet/api/system.int32) + +`bar` [char](https://learn.microsoft.com/dotnet/api/system.char) + +### Issue8665(int, char, string) + +```csharp +public Issue8665(int foo, char bar, string baz) +``` + +#### Parameters + +`foo` [int](https://learn.microsoft.com/dotnet/api/system.int32) + +`bar` [char](https://learn.microsoft.com/dotnet/api/system.char) + +`baz` [string](https://learn.microsoft.com/dotnet/api/system.string) + +## Properties + +### Bar + +```csharp +public char Bar { get; } +``` + +Property Value + +[char](https://learn.microsoft.com/dotnet/api/system.char) + +### Baz + +```csharp +public string Baz { get; } +``` + +Property Value + +[string](https://learn.microsoft.com/dotnet/api/system.string) + +### Foo + +```csharp +public int Foo { get; } +``` + +Property Value + +[int](https://learn.microsoft.com/dotnet/api/system.int32) + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8696Attribute.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8696Attribute.verified.md new file mode 100644 index 00000000000..4484bd40c62 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8696Attribute.verified.md @@ -0,0 +1,85 @@ +# Class Issue8696Attribute + +_Namespace:_ [BuildFromProject](BuildFromProject.md) +_Assembly:_ BuildFromProject.dll + +```csharp +public class Class1.Issue8696Attribute : Attribute +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[Attribute](https://learn.microsoft.com/dotnet/api/system.attribute) ← +[Class1](BuildFromProject.Class1.md).[Issue8696Attribute](BuildFromProject.Class1.Issue8696Attribute.md) + +#### Inherited Members + +[Attribute.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.attribute.equals), +[Attribute.GetCustomAttribute(Assembly, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattribute#system-attribute-getcustomattribute(system-reflection-assembly-system-type)), +[Attribute.GetCustomAttribute(Assembly, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattribute#system-attribute-getcustomattribute(system-reflection-assembly-system-type-system-boolean)), +[Attribute.GetCustomAttribute(MemberInfo, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattribute#system-attribute-getcustomattribute(system-reflection-memberinfo-system-type)), +[Attribute.GetCustomAttribute(MemberInfo, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattribute#system-attribute-getcustomattribute(system-reflection-memberinfo-system-type-system-boolean)), +[Attribute.GetCustomAttribute(Module, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattribute#system-attribute-getcustomattribute(system-reflection-module-system-type)), +[Attribute.GetCustomAttribute(Module, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattribute#system-attribute-getcustomattribute(system-reflection-module-system-type-system-boolean)), +[Attribute.GetCustomAttribute(ParameterInfo, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattribute#system-attribute-getcustomattribute(system-reflection-parameterinfo-system-type)), +[Attribute.GetCustomAttribute(ParameterInfo, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattribute#system-attribute-getcustomattribute(system-reflection-parameterinfo-system-type-system-boolean)), +[Attribute.GetCustomAttributes(Assembly)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes(system-reflection-assembly)), +[Attribute.GetCustomAttributes(Assembly, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes(system-reflection-assembly-system-boolean)), +[Attribute.GetCustomAttributes(Assembly, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes(system-reflection-assembly-system-type)), +[Attribute.GetCustomAttributes(Assembly, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes(system-reflection-assembly-system-type-system-boolean)), +[Attribute.GetCustomAttributes(MemberInfo)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes(system-reflection-memberinfo)), +[Attribute.GetCustomAttributes(MemberInfo, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes(system-reflection-memberinfo-system-boolean)), +[Attribute.GetCustomAttributes(MemberInfo, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes(system-reflection-memberinfo-system-type)), +[Attribute.GetCustomAttributes(MemberInfo, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes(system-reflection-memberinfo-system-type-system-boolean)), +[Attribute.GetCustomAttributes(Module)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes(system-reflection-module)), +[Attribute.GetCustomAttributes(Module, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes(system-reflection-module-system-boolean)), +[Attribute.GetCustomAttributes(Module, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes(system-reflection-module-system-type)), +[Attribute.GetCustomAttributes(Module, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes(system-reflection-module-system-type-system-boolean)), +[Attribute.GetCustomAttributes(ParameterInfo)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes(system-reflection-parameterinfo)), +[Attribute.GetCustomAttributes(ParameterInfo, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes(system-reflection-parameterinfo-system-boolean)), +[Attribute.GetCustomAttributes(ParameterInfo, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes(system-reflection-parameterinfo-system-type)), +[Attribute.GetCustomAttributes(ParameterInfo, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes(system-reflection-parameterinfo-system-type-system-boolean)), +[Attribute.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.attribute.gethashcode), +[Attribute.IsDefaultAttribute()](https://learn.microsoft.com/dotnet/api/system.attribute.isdefaultattribute), +[Attribute.IsDefined(Assembly, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.isdefined#system-attribute-isdefined(system-reflection-assembly-system-type)), +[Attribute.IsDefined(Assembly, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.isdefined#system-attribute-isdefined(system-reflection-assembly-system-type-system-boolean)), +[Attribute.IsDefined(MemberInfo, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.isdefined#system-attribute-isdefined(system-reflection-memberinfo-system-type)), +[Attribute.IsDefined(MemberInfo, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.isdefined#system-attribute-isdefined(system-reflection-memberinfo-system-type-system-boolean)), +[Attribute.IsDefined(Module, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.isdefined#system-attribute-isdefined(system-reflection-module-system-type)), +[Attribute.IsDefined(Module, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.isdefined#system-attribute-isdefined(system-reflection-module-system-type-system-boolean)), +[Attribute.IsDefined(ParameterInfo, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.isdefined#system-attribute-isdefined(system-reflection-parameterinfo-system-type)), +[Attribute.IsDefined(ParameterInfo, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.isdefined#system-attribute-isdefined(system-reflection-parameterinfo-system-type-system-boolean)), +[Attribute.Match(object?)](https://learn.microsoft.com/dotnet/api/system.attribute.match), +[Attribute.TypeId](https://learn.microsoft.com/dotnet/api/system.attribute.typeid), +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + +## Constructors + +### Issue8696Attribute(string?, int, int, string[]?, bool, Type?) + +```csharp +[Class1.Issue8696("Changes the name of the server in the server list", 0, 0, null, false, null)] +public Issue8696Attribute(string? description = null, int boundsMin = 0, int boundsMax = 0, string[]? validGameModes = null, bool hasMultipleSelections = false, Type? enumType = null) +``` + +#### Parameters + +`description` [string](https://learn.microsoft.com/dotnet/api/system.string)? + +`boundsMin` [int](https://learn.microsoft.com/dotnet/api/system.int32) + +`boundsMax` [int](https://learn.microsoft.com/dotnet/api/system.int32) + +`validGameModes` [string](https://learn.microsoft.com/dotnet/api/system.string)[]? + +`hasMultipleSelections` [bool](https://learn.microsoft.com/dotnet/api/system.boolean) + +`enumType` [Type](https://learn.microsoft.com/dotnet/api/system.type)? + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8948.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8948.verified.md new file mode 100644 index 00000000000..5b186a4ad4f --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8948.verified.md @@ -0,0 +1,44 @@ +# Class Issue8948 + +_Namespace:_ [BuildFromProject](BuildFromProject.md) +_Assembly:_ BuildFromProject.dll + +```csharp +public class Class1.Issue8948 : Class1.IIssue8948 +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[Class1](BuildFromProject.Class1.md).[Issue8948](BuildFromProject.Class1.Issue8948.md) + +#### Implements + +[Class1](BuildFromProject.Class1.md).[IIssue8948](BuildFromProject.Class1.IIssue8948.md) + +#### Inherited Members + +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + +## Methods + +### DoNothing() + +Does nothing with generic type T. + +```csharp +public void DoNothing() +``` + +#### Type Parameters + +`T` + +A generic type. + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Test`1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Test`1.verified.md new file mode 100644 index 00000000000..b9356894c52 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Test`1.verified.md @@ -0,0 +1,28 @@ +# Class Test + +_Namespace:_ [BuildFromProject](BuildFromProject.md) +_Assembly:_ BuildFromProject.dll + +```csharp +public class Class1.Test +``` + +## Type Parameters + +`T` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[Class1](BuildFromProject.Class1.md).[Test](BuildFromProject.Class1.Test-1.md) + +#### Inherited Members + +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.verified.md new file mode 100644 index 00000000000..65dd110400b --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.verified.md @@ -0,0 +1,203 @@ +# Class Class1 + +_Namespace:_ [BuildFromProject](BuildFromProject.md) +_Assembly:_ BuildFromProject.dll + +```csharp +public class Class1 : IClass1 +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[Class1](BuildFromProject.Class1.md) + +#### Implements + +IClass1 + +#### Inherited Members + +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + +## Methods + +### Issue1651() + +Pricing models are used to calculate theoretical option values +
  • 1Black Scholes
  • 2Black76
  • 3Black76Fut
  • 4Equity Tree
  • 5Variance Swap
  • 6Dividend Forecast
+ +```csharp +public void Issue1651() +``` + +### Issue1887() + +IConfiguration related helper and extension routines. + +```csharp +public void Issue1887() +``` + +### Issue2623() + +```csharp +public void Issue2623() +``` + +#### Examples + +```csharp +MyClass myClass = new MyClass(); + +void Update() +{ + myClass.Execute(); +} +``` + +#### Remarks + +For example: + + MyClass myClass = new MyClass(); + + void Update() + { + myClass.Execute(); + } + +### Issue2723() + +```csharp +public void Issue2723() +``` + +#### Remarks + +> [!NOTE] +> This is a <note>. & " ' + +Inline ``. + +[link](https://www.github.com "title") + +```csharp +for (var i = 0; i > 10; i++) // & " ' +var range = new Range { Min = 0, Max = 10 }; +``` + +
var range = new Range<int> { Min = 0, Max = 10 };
+ +### Issue4017() + +```csharp +public void Issue4017() +``` + +#### Examples + +
public void HookMessageDeleted(BaseSocketClient client)
+{
+    client.MessageDeleted += HandleMessageDelete;
+}
+
+public Task HandleMessageDelete(Cacheable<IMessage, ulong> cachedMessage, ISocketMessageChannel channel)
+{
+    // check if the message exists in cache; if not, we cannot report what was removed
+    if (!cachedMessage.HasValue) return;
+    var message = cachedMessage.Value;
+    Console.WriteLine($"A message ({message.Id}) from {message.Author} was removed from the channel {channel.Name} ({channel.Id}):"
+        + Environment.NewLine
+        + message.Content);
+    return Task.CompletedTask;
+}
+ +#### Remarks + +
void Update()
+{
+    myClass.Execute();
+}
+ +### Issue4392() + +```csharp +public void Issue4392() +``` + +#### Remarks + +@"\\?\" `@"\\?\"` + +### Issue7484() + +```csharp +public void Issue7484() +``` + +#### Remarks + +There's really no reason to not believe that this class can test things. +
TermDescription
A TermA Description
Bee TermBee Description
+ +### Issue8764() + +```csharp +public void Issue8764() where T : unmanaged +``` + +#### Type Parameters + +`T` + +### Issue896() + +Test + +```csharp +public void Issue896() +``` + +#### See Also + +[Class1](BuildFromProject.Class1.md).[Test](BuildFromProject.Class1.Test-1.md) + +[Class1](BuildFromProject.Class1.md) + +### Issue9216() + +Calculates the determinant of a 3-dimensional matrix: + +$$A = \begin{vmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{vmatrix}$$ + +Returns the smallest value: + +$$\left\{\begin{matrix}a, aa\\ \end{matrix} \right.$$ + +```csharp +public static double Issue9216() +``` + +#### Returns + +[double](https://learn.microsoft.com/dotnet/api/system.double) + +### XmlCommentIncludeTag() + +This method should do something... + +```csharp +public void XmlCommentIncludeTag() +``` + +#### Remarks + +This is remarks. + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.IInheritdoc.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.IInheritdoc.verified.md new file mode 100644 index 00000000000..17239e8e14d --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.IInheritdoc.verified.md @@ -0,0 +1,19 @@ +# Interface IInheritdoc + +_Namespace:_ [BuildFromProject](BuildFromProject.md) +_Assembly:_ BuildFromProject.dll + +```csharp +public interface IInheritdoc +``` + +## Methods + +### Issue7629() + +This method should do something... + +```csharp +void Issue7629() +``` + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class1`1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class1`1.verified.md new file mode 100644 index 00000000000..c39c7a36890 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class1`1.verified.md @@ -0,0 +1,54 @@ +# Class Class1 + +_Namespace:_ [BuildFromProject](BuildFromProject.md) +_Assembly:_ BuildFromProject.dll + +```csharp +public abstract class Inheritdoc.Issue6366.Class1 +``` + +## Type Parameters + +`T` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[Inheritdoc](BuildFromProject.Inheritdoc.md).[Issue6366](BuildFromProject.Inheritdoc.Issue6366.md).[Class1](BuildFromProject.Inheritdoc.Issue6366.Class1-1.md) + +#### Inherited Members + +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + +## Methods + +### TestMethod1(T, int) + +This text inherited. + +```csharp +public abstract T TestMethod1(T parm1, int parm2) +``` + +#### Parameters + +`parm1` T + +This text NOT inherited. + +`parm2` [int](https://learn.microsoft.com/dotnet/api/system.int32) + +This text inherited. + +#### Returns + +T + +This text inherited. + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class2.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class2.verified.md new file mode 100644 index 00000000000..2050b2842bb --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class2.verified.md @@ -0,0 +1,52 @@ +# Class Class2 + +_Namespace:_ [BuildFromProject](BuildFromProject.md) +_Assembly:_ BuildFromProject.dll + +```csharp +public class Inheritdoc.Issue6366.Class2 : Inheritdoc.Issue6366.Class1 +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[Inheritdoc](BuildFromProject.Inheritdoc.md).[Issue6366](BuildFromProject.Inheritdoc.Issue6366.md).[Class1](BuildFromProject.Inheritdoc.Issue6366.Class1-1.md)<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)> ← +[Inheritdoc](BuildFromProject.Inheritdoc.md).[Issue6366](BuildFromProject.Inheritdoc.Issue6366.md).[Class2](BuildFromProject.Inheritdoc.Issue6366.Class2.md) + +#### Inherited Members + +[Inheritdoc.Issue6366.Class1.TestMethod1(bool, int)](BuildFromProject.Inheritdoc.Issue6366.Class1{System.Boolean}.md#BuildFromProject.Inheritdoc.Issue6366.Class1{System.Boolean}.TestMethod1(System.Boolean,System.Int32)), +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + +## Methods + +### TestMethod1(bool, int) + +This text inherited. + +```csharp +public override bool TestMethod1(bool parm1, int parm2) +``` + +#### Parameters + +`parm1` [bool](https://learn.microsoft.com/dotnet/api/system.boolean) + +This text NOT inherited. + +`parm2` [int](https://learn.microsoft.com/dotnet/api/system.int32) + +This text inherited. + +#### Returns + +[bool](https://learn.microsoft.com/dotnet/api/system.boolean) + +This text inherited. + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.verified.md new file mode 100644 index 00000000000..1a00b813af9 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.verified.md @@ -0,0 +1,24 @@ +# Class Issue6366 + +_Namespace:_ [BuildFromProject](BuildFromProject.md) +_Assembly:_ BuildFromProject.dll + +```csharp +public class Inheritdoc.Issue6366 +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[Inheritdoc](BuildFromProject.Inheritdoc.md).[Issue6366](BuildFromProject.Inheritdoc.Issue6366.md) + +#### Inherited Members + +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7035.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7035.verified.md new file mode 100644 index 00000000000..32d62a5aa28 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7035.verified.md @@ -0,0 +1,38 @@ +# Class Issue7035 + +_Namespace:_ [BuildFromProject](BuildFromProject.md) +_Assembly:_ BuildFromProject.dll + +```csharp +public class Inheritdoc.Issue7035 +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[Inheritdoc](BuildFromProject.Inheritdoc.md).[Issue7035](BuildFromProject.Inheritdoc.Issue7035.md) + +#### Inherited Members + +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + +## Methods + +### A() + +```csharp +public void A() +``` + +### B() + +```csharp +public void B() +``` + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7484.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7484.verified.md new file mode 100644 index 00000000000..53fa34a0cf7 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7484.verified.md @@ -0,0 +1,86 @@ +# Class Issue7484 + +_Namespace:_ [BuildFromProject](BuildFromProject.md) +_Assembly:_ BuildFromProject.dll + +This is a test class to have something for DocFX to document. + +```csharp +public class Inheritdoc.Issue7484 +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[Inheritdoc](BuildFromProject.Inheritdoc.md).[Issue7484](BuildFromProject.Inheritdoc.Issue7484.md) + +#### Inherited Members + +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + +## Remarks + +We're going to talk about things now. +
+Simple method to generate docs for. +
+A string that could have something. +
+ +## Constructors + +### Issue7484() + +This is a constructor to document. + +```csharp +public Issue7484() +``` + +## Properties + +### DoDad + +A string that could have something. + +```csharp +public string DoDad { get; } +``` + +Property Value + +[string](https://learn.microsoft.com/dotnet/api/system.string) + +## Methods + +### BoolReturningMethod(bool) + +Simple method to generate docs for. + +```csharp +public bool BoolReturningMethod(bool source) +``` + +#### Parameters + +`source` [bool](https://learn.microsoft.com/dotnet/api/system.boolean) + +A meaningless boolean value, much like most questions in the world. + +#### Returns + +[bool](https://learn.microsoft.com/dotnet/api/system.boolean) + +An exactly equivalently meaningless boolean value, much like most answers in the world. + +#### Remarks + +I'd like to take a moment to thank all of those who helped me get to +a place where I can write documentation like this. + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8101.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8101.verified.md new file mode 100644 index 00000000000..f062603e841 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8101.verified.md @@ -0,0 +1,90 @@ +# Class Issue8101 + +_Namespace:_ [BuildFromProject](BuildFromProject.md) +_Assembly:_ BuildFromProject.dll + +```csharp +public class Inheritdoc.Issue8101 +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[Inheritdoc](BuildFromProject.Inheritdoc.md).[Issue8101](BuildFromProject.Inheritdoc.Issue8101.md) + +#### Inherited Members + +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + +## Methods + +### Tween(float, float, float, Action) + +Create a new tween. + +```csharp +public static object Tween(float from, float to, float duration, Action onChange) +``` + +#### Parameters + +`from` [float](https://learn.microsoft.com/dotnet/api/system.single) + +The starting value. + +`to` [float](https://learn.microsoft.com/dotnet/api/system.single) + +The end value. + +`duration` [float](https://learn.microsoft.com/dotnet/api/system.single) + +Total tween duration in seconds. + +`onChange` [Action](https://learn.microsoft.com/dotnet/api/system.action-1)<[float](https://learn.microsoft.com/dotnet/api/system.single)> + +A callback that will be invoked every time the tween value changes. + +#### Returns + +[object](https://learn.microsoft.com/dotnet/api/system.object) + +The newly created tween instance. + +### Tween(int, int, float, Action) + +Create a new tween. + +```csharp +public static object Tween(int from, int to, float duration, Action onChange) +``` + +#### Parameters + +`from` [int](https://learn.microsoft.com/dotnet/api/system.int32) + +The starting value. + +`to` [int](https://learn.microsoft.com/dotnet/api/system.int32) + +The end value. + +`duration` [float](https://learn.microsoft.com/dotnet/api/system.single) + +Total tween duration in seconds. + +`onChange` [Action](https://learn.microsoft.com/dotnet/api/system.action-1)<[int](https://learn.microsoft.com/dotnet/api/system.int32)> + +A callback that will be invoked every time the tween value changes. + +#### Returns + +[object](https://learn.microsoft.com/dotnet/api/system.object) + +The newly created tween instance. + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8129.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8129.verified.md new file mode 100644 index 00000000000..3c39ae1f14c --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8129.verified.md @@ -0,0 +1,39 @@ +# Struct Issue8129 + +_Namespace:_ [BuildFromProject](BuildFromProject.md) +_Assembly:_ BuildFromProject.dll + +```csharp +public struct Inheritdoc.Issue8129 +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[ValueType](https://learn.microsoft.com/dotnet/api/system.valuetype) ← +[Inheritdoc](BuildFromProject.Inheritdoc.md).[Issue8129](BuildFromProject.Inheritdoc.Issue8129.md) + +#### Inherited Members + +[ValueType.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.valuetype.equals), +[ValueType.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.valuetype.gethashcode), +[ValueType.ToString()](https://learn.microsoft.com/dotnet/api/system.valuetype.tostring), +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + +## Constructors + +### Issue8129(string) + +```csharp +public Issue8129(string foo) +``` + +#### Parameters + +`foo` [string](https://learn.microsoft.com/dotnet/api/system.string) + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.verified.md new file mode 100644 index 00000000000..3d4f2700a0e --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.verified.md @@ -0,0 +1,55 @@ +# Class Inheritdoc + +_Namespace:_ [BuildFromProject](BuildFromProject.md) +_Assembly:_ BuildFromProject.dll + +```csharp +public class Inheritdoc : IInheritdoc, IDisposable +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[Inheritdoc](BuildFromProject.Inheritdoc.md) + +#### Implements + +[IInheritdoc](BuildFromProject.IInheritdoc.md), +[IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable) + +#### Inherited Members + +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + +## Methods + +### Dispose() + +Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + +```csharp +public void Dispose() +``` + +### Issue7628() + +This method should do something... + +```csharp +public void Issue7628() +``` + +### Issue7629() + +This method should do something... + +```csharp +public void Issue7629() +``` + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.A.A.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.A.A.verified.md new file mode 100644 index 00000000000..1a6cd162fec --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.A.A.verified.md @@ -0,0 +1,24 @@ +# Class A + +_Namespace:_ [BuildFromProject](BuildFromProject.md).[Issue8540](BuildFromProject.Issue8540.md).[A](BuildFromProject.Issue8540.A.md) +_Assembly:_ BuildFromProject.dll + +```csharp +public class A +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[A](BuildFromProject.Issue8540.A.A.md) + +#### Inherited Members + +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.B.B.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.B.B.verified.md new file mode 100644 index 00000000000..48caec9aeaf --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.B.B.verified.md @@ -0,0 +1,24 @@ +# Class B + +_Namespace:_ [BuildFromProject](BuildFromProject.md).[Issue8540](BuildFromProject.Issue8540.md).[B](BuildFromProject.Issue8540.B.md) +_Assembly:_ BuildFromProject.dll + +```csharp +public class B +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[B](BuildFromProject.Issue8540.B.B.md) + +#### Inherited Members + +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.BaseClass1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.BaseClass1.verified.md new file mode 100644 index 00000000000..8c878f493eb --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.BaseClass1.verified.md @@ -0,0 +1,47 @@ +# Class BaseClass1 + +_Namespace:_ [BuildFromVBSourceCode](BuildFromVBSourceCode.md) +_Assembly:_ ?.dll + +This is the BaseClass + +```csharp +public abstract class BaseClass1 +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[BaseClass1](BuildFromVBSourceCode.BaseClass1.md) + +#### Derived + +[Class1](BuildFromVBSourceCode.Class1.md) + +#### Inherited Members + +[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.Finalize()](https://learn.microsoft.com/dotnet/api/system.object.finalize), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + +## Methods + +### WithDeclarationKeyword(Class1) + +```csharp +public abstract DateTime WithDeclarationKeyword(Class1 keyword) +``` + +#### Parameters + +`keyword` [Class1](BuildFromVBSourceCode.Class1.md) + +#### Returns + +[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.Class1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.Class1.verified.md new file mode 100644 index 00000000000..6f790d5e7fe --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.Class1.verified.md @@ -0,0 +1,96 @@ +# Class Class1 + +_Namespace:_ [BuildFromVBSourceCode](BuildFromVBSourceCode.md) +_Assembly:_ ?.dll + +This is summary from vb class... + +```csharp +public class Class1 : BaseClass1 +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[BaseClass1](BuildFromVBSourceCode.BaseClass1.md) ← +[Class1](BuildFromVBSourceCode.Class1.md) + +#### Inherited Members + +[BaseClass1.WithDeclarationKeyword(Class1)](BuildFromVBSourceCode.BaseClass1.md#BuildFromVBSourceCode.BaseClass1.WithDeclarationKeyword(BuildFromVBSourceCode.Class1)), +[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.Finalize()](https://learn.microsoft.com/dotnet/api/system.object.finalize), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + +## Fields + +### ValueClass + +This is a *Value* type + +```csharp +public Class1 ValueClass +``` + +Field Value + +[Class1](BuildFromVBSourceCode.Class1.md) + +## Properties + +### Keyword + +```csharp +[Obsolete("This member is obsolete.", true)] +public Class1 Keyword { get; } +``` + +Property Value + +[Class1](BuildFromVBSourceCode.Class1.md) + +## Methods + +### Value(string) + +This is a *Function* + +```csharp +public int Value(string name) +``` + +#### Parameters + +`name` [string](https://learn.microsoft.com/dotnet/api/system.string) + +Name as the **String** + value + +#### Returns + +[int](https://learn.microsoft.com/dotnet/api/system.int32) + +**Returns** + Ahooo + +### WithDeclarationKeyword(Class1) + +What is **Sub**? + +```csharp +public override DateTime WithDeclarationKeyword(Class1 keyword) +``` + +#### Parameters + +`keyword` [Class1](BuildFromVBSourceCode.Class1.md) + +#### Returns + +[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.CatException`1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.CatException`1.verified.md new file mode 100644 index 00000000000..51dc1f63708 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.CatException`1.verified.md @@ -0,0 +1,46 @@ +# Class CatException + +_Namespace:_ [CatLibrary](CatLibrary.md) +_Assembly:_ CatLibrary.dll + +```csharp +public class CatException : Exception, ISerializable +``` + +## Type Parameters + +`T` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[Exception](https://learn.microsoft.com/dotnet/api/system.exception) ← +[CatException](CatLibrary.CatException-1.md) + +#### Implements + +[ISerializable](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.iserializable) + +#### Inherited Members + +[Exception.GetBaseException()](https://learn.microsoft.com/dotnet/api/system.exception.getbaseexception), +[Exception.GetObjectData(SerializationInfo, StreamingContext)](https://learn.microsoft.com/dotnet/api/system.exception.getobjectdata), +[Exception.GetType()](https://learn.microsoft.com/dotnet/api/system.exception.gettype), +[Exception.ToString()](https://learn.microsoft.com/dotnet/api/system.exception.tostring), +[Exception.Data](https://learn.microsoft.com/dotnet/api/system.exception.data), +[Exception.HelpLink](https://learn.microsoft.com/dotnet/api/system.exception.helplink), +[Exception.HResult](https://learn.microsoft.com/dotnet/api/system.exception.hresult), +[Exception.InnerException](https://learn.microsoft.com/dotnet/api/system.exception.innerexception), +[Exception.Message](https://learn.microsoft.com/dotnet/api/system.exception.message), +[Exception.Source](https://learn.microsoft.com/dotnet/api/system.exception.source), +[Exception.StackTrace](https://learn.microsoft.com/dotnet/api/system.exception.stacktrace), +[Exception.TargetSite](https://learn.microsoft.com/dotnet/api/system.exception.targetsite), +[Exception.SerializeObjectState](https://learn.microsoft.com/dotnet/api/system.exception.serializeobjectstate), +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Cat`2.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Cat`2.verified.md new file mode 100644 index 00000000000..f55fde9ba65 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Cat`2.verified.md @@ -0,0 +1,345 @@ +# Class Cat + +_Namespace:_ [CatLibrary](CatLibrary.md) +_Assembly:_ CatLibrary.dll + +

Here's main class of this Demo.

+

You can see mostly type of article within this class and you for more detail, please see the remarks.

+

+

this class is a template class. It has two Generic parameter. they are: T and K.

+

The extension method of this class can refer to class

+ +```csharp +[Serializable] +public class Cat : ICat, IAnimal where T : class, new() where K : struct +``` + +## Type Parameters + +`T` + +This type should be class and can new instance. + +`K` + +This type is a struct type, class type can't be used for this parameter. + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[Cat](CatLibrary.Cat-2.md) + +#### Implements + +[ICat](CatLibrary.ICat.md), +[IAnimal](CatLibrary.IAnimal.md) + +#### Inherited Members + +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + +#### Extension Methods + +[ICatExtension.Play(ICat, ContainersRefType.ColorType)](CatLibrary.ICatExtension.md#CatLibrary.ICatExtension.Play(CatLibrary.Core.ContainersRefType.ColorType)), +[ICatExtension.Sleep(ICat, long)](CatLibrary.ICatExtension.md#CatLibrary.ICatExtension.Sleep(System.Int64)) + +## Examples + +

Here's example of how to create an instance of this class. As T is limited with class and K is limited with struct.

+
var a = new Cat(object, int)();
+int catNumber = new int();
+unsafe
+{
+    a.GetFeetLength(catNumber);
+}
+

As you see, here we bring in pointer so we need to add unsafe keyword.

+ +## Remarks + +

Here's all the content you can see in this class.

+ +## Constructors + +### Cat() + +Default constructor. + +```csharp +public Cat() +``` + +### Cat(T) + +Constructor with one generic parameter. + +```csharp +public Cat(T ownType) +``` + +#### Parameters + +`ownType` T + +This parameter type defined by class. + +### Cat(string, out int, string, bool) + +It's a complex constructor. The parameter will have some attributes. + +```csharp +public Cat(string nickName, out int age, string realName, bool isHealthy) +``` + +#### Parameters + +`nickName` [string](https://learn.microsoft.com/dotnet/api/system.string) + +it's string type. + +`age` [int](https://learn.microsoft.com/dotnet/api/system.int32) + +It's an out and ref parameter. + +`realName` [string](https://learn.microsoft.com/dotnet/api/system.string) + +It's an out paramter. + +`isHealthy` [bool](https://learn.microsoft.com/dotnet/api/system.boolean) + +It's an in parameter. + +## Fields + +### isHealthy + +Field with attribute. + +```csharp +[ContextStatic] +[NonSerialized] +public bool isHealthy +``` + +Field Value + +[bool](https://learn.microsoft.com/dotnet/api/system.boolean) + +## Properties + +### Age + +Hint cat's age. + +```csharp +protected int Age { get; set; } +``` + +Property Value + +[int](https://learn.microsoft.com/dotnet/api/system.int32) + +### Name + +EII property. + +```csharp +public string Name { get; } +``` + +Property Value + +[string](https://learn.microsoft.com/dotnet/api/system.string) + +### this[string] + +This is index property of Cat. You can see that the visibility is different between get and set method. + +```csharp +public int this[string a] { protected get; set; } +``` + +Property Value + +[int](https://learn.microsoft.com/dotnet/api/system.int32) + +## Methods + +### CalculateFood(DateTime) + +It's a method with complex return type. + +```csharp +public Dictionary> CalculateFood(DateTime date) +``` + +#### Parameters + +`date` [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) + +Date time to now. + +#### Returns + +[Dictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2)<[string](https://learn.microsoft.com/dotnet/api/system.string), [List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)<[int](https://learn.microsoft.com/dotnet/api/system.int32)>> + +It's a relationship map of different kind food. + +### Equals(object) + +Override the method of Object.Equals(object obj). + +```csharp +public override bool Equals(object obj) +``` + +#### Parameters + +`obj` [object](https://learn.microsoft.com/dotnet/api/system.object) + +Can pass any class type. + +#### Returns + +[bool](https://learn.microsoft.com/dotnet/api/system.boolean) + +The return value tell you whehter the compare operation is successful. + +### GetTailLength(int*, params object[]) + +It's an unsafe method. +As you see, catName is a pointer, so we need to add unsafe keyword. + +```csharp +public long GetTailLength(int* catName, params object[] parameters) +``` + +#### Parameters + +`catName` [int](https://learn.microsoft.com/dotnet/api/system.int32)* + +Thie represent for cat name length. + +`parameters` [object](https://learn.microsoft.com/dotnet/api/system.object)[] + +Optional parameters. + +#### Returns + +[long](https://learn.microsoft.com/dotnet/api/system.int64) + +Return cat tail's length. + +### Jump(T, K, ref bool) + +This method have attribute above it. + +```csharp +[Conditional("Debug")] +public void Jump(T ownType, K anotherOwnType, ref bool cheat) +``` + +#### Parameters + +`ownType` T + +Type come from class define. + +`anotherOwnType` K + +Type come from class define. + +`cheat` [bool](https://learn.microsoft.com/dotnet/api/system.boolean) + +Hint whether this cat has cheat mode. + +#### Exceptions + +[ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) + +This is an argument exception + +## Events + +### ownEat + +Eat event of this cat + +```csharp +public event EventHandler ownEat +``` + +Event Type + +[EventHandler](https://learn.microsoft.com/dotnet/api/system.eventhandler) + +## Operators + +### operator +(Cat, int) + +Addition operator of this class. + +```csharp +public static int operator +(Cat lsr, int rsr) +``` + +#### Parameters + +`lsr` [Cat](CatLibrary.Cat-2.md) + +.. + +`rsr` [int](https://learn.microsoft.com/dotnet/api/system.int32) + +~~ + +#### Returns + +[int](https://learn.microsoft.com/dotnet/api/system.int32) + +Result with int type. + +### explicit operator Tom(Cat) + +Expilicit operator of this class. +

It means this cat can evolve to change to Tom. Tom and Jerry.

+ +```csharp +public static explicit operator Tom(Cat src) +``` + +#### Parameters + +`src` [Cat](CatLibrary.Cat-2.md) + +Instance of this class. + +#### Returns + +[Tom](CatLibrary.Tom.md) + +Advanced class type of cat. + +### operator -(Cat, int) + +Similar with operaotr +, refer to that topic. + +```csharp +public static int operator -(Cat lsr, int rsr) +``` + +#### Parameters + +`lsr` [Cat](CatLibrary.Cat-2.md) + +`rsr` [int](https://learn.microsoft.com/dotnet/api/system.int32) + +#### Returns + +[int](https://learn.microsoft.com/dotnet/api/system.int32) + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Complex`2.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Complex`2.verified.md new file mode 100644 index 00000000000..ff9e097d736 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Complex`2.verified.md @@ -0,0 +1,30 @@ +# Class Complex + +_Namespace:_ [CatLibrary](CatLibrary.md) +_Assembly:_ CatLibrary.dll + +```csharp +public class Complex +``` + +## Type Parameters + +`T` + +`J` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[Complex](CatLibrary.Complex-2.md) + +#### Inherited Members + +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ColorType.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ColorType.verified.md new file mode 100644 index 00000000000..f49c95218f4 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ColorType.verified.md @@ -0,0 +1,25 @@ +# Enum ColorType + +_Namespace:_ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) +_Assembly:_ CatLibrary.Core.dll + +Enumeration ColorType + +```csharp +public enum ContainersRefType.ColorType +``` + +## Fields + +### `Red = 0` + +red + +### `Blue = 1` + +blue + +### `Yellow = 2` + +yellow + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChild.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChild.verified.md new file mode 100644 index 00000000000..9a8742c3b59 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChild.verified.md @@ -0,0 +1,24 @@ +# Class ContainersRefTypeChild + +_Namespace:_ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) +_Assembly:_ CatLibrary.Core.dll + +```csharp +public class ContainersRefType.ContainersRefTypeChild +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[ContainersRefType](CatLibrary.Core.ContainersRefType.md).[ContainersRefTypeChild](CatLibrary.Core.ContainersRefType.ContainersRefTypeChild.md) + +#### Inherited Members + +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChildInterface.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChildInterface.verified.md new file mode 100644 index 00000000000..e1a7b1329e4 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChildInterface.verified.md @@ -0,0 +1,9 @@ +# Interface ContainersRefTypeChildInterface + +_Namespace:_ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) +_Assembly:_ CatLibrary.Core.dll + +```csharp +public interface ContainersRefType.ContainersRefTypeChildInterface +``` + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeDelegate.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeDelegate.verified.md new file mode 100644 index 00000000000..dbbfdf5ed69 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeDelegate.verified.md @@ -0,0 +1,11 @@ +# Delegate ContainersRefTypeDelegate + +_Namespace:_ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) +_Assembly:_ CatLibrary.Core.dll + +Delegate ContainersRefTypeDelegate + +```csharp +public delegate void ContainersRefType.ContainersRefTypeDelegate() +``` + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.verified.md new file mode 100644 index 00000000000..c9e93e04992 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.verified.md @@ -0,0 +1,93 @@ +# Struct ContainersRefType + +_Namespace:_ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) +_Assembly:_ CatLibrary.Core.dll + +Struct ContainersRefType + +```csharp +public struct ContainersRefType +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[ValueType](https://learn.microsoft.com/dotnet/api/system.valuetype) ← +[ContainersRefType](CatLibrary.Core.ContainersRefType.md) + +#### Inherited Members + +[ValueType.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.valuetype.equals), +[ValueType.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.valuetype.gethashcode), +[ValueType.ToString()](https://learn.microsoft.com/dotnet/api/system.valuetype.tostring), +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + +#### Extension Methods + +[Issue231.Bar(ContainersRefType)](CatLibrary.Core.Issue231.md#CatLibrary.Core.Issue231.Bar), +[Issue231.Foo(ContainersRefType)](CatLibrary.Core.Issue231.md#CatLibrary.Core.Issue231.Foo) + +## Fields + +### ColorCount + +ColorCount + +```csharp +public long ColorCount +``` + +Field Value + +[long](https://learn.microsoft.com/dotnet/api/system.int64) + +## Properties + +### GetColorCount + +GetColorCount + +```csharp +public long GetColorCount { get; } +``` + +Property Value + +[long](https://learn.microsoft.com/dotnet/api/system.int64) + +## Methods + +### ContainersRefTypeNonRefMethod(params object[]) + +ContainersRefTypeNonRefMethod +array + +```csharp +public static int ContainersRefTypeNonRefMethod(params object[] parmsArray) +``` + +#### Parameters + +`parmsArray` [object](https://learn.microsoft.com/dotnet/api/system.object)[] + +#### Returns + +[int](https://learn.microsoft.com/dotnet/api/system.int32) + +## Events + +### ContainersRefTypeEventHandler + +```csharp +public event EventHandler ContainersRefTypeEventHandler +``` + +Event Type + +[EventHandler](https://learn.microsoft.com/dotnet/api/system.eventhandler) + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ExplicitLayoutClass.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ExplicitLayoutClass.verified.md new file mode 100644 index 00000000000..8bb145a4637 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ExplicitLayoutClass.verified.md @@ -0,0 +1,24 @@ +# Class ExplicitLayoutClass + +_Namespace:_ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) +_Assembly:_ CatLibrary.Core.dll + +```csharp +public class ExplicitLayoutClass +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[ExplicitLayoutClass](CatLibrary.Core.ExplicitLayoutClass.md) + +#### Inherited Members + +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.Issue231.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.Issue231.verified.md new file mode 100644 index 00000000000..257cb27990a --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.Issue231.verified.md @@ -0,0 +1,36 @@ +# Class Issue231 + +_Namespace:_ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) +_Assembly:_ CatLibrary.Core.dll + +```csharp +public static class Issue231 +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[Issue231](CatLibrary.Core.Issue231.md) + +#### Inherited Members + +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + +## Methods + +### Foo(ContainersRefType) + +```csharp +public static void Foo(this ContainersRefType c) +``` + +#### Parameters + +`c` [ContainersRefType](CatLibrary.Core.ContainersRefType.md) + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.FakeDelegate`1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.FakeDelegate`1.verified.md new file mode 100644 index 00000000000..c23803d0682 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.FakeDelegate`1.verified.md @@ -0,0 +1,37 @@ +# Delegate FakeDelegate + +_Namespace:_ [CatLibrary](CatLibrary.md) +_Assembly:_ CatLibrary.dll + +Fake delegate + +```csharp +public delegate int FakeDelegate(long num, string name, params object[] scores) +``` + +## Parameters + +`num` [long](https://learn.microsoft.com/dotnet/api/system.int64) + +Fake para + +`name` [string](https://learn.microsoft.com/dotnet/api/system.string) + +Fake para + +`scores` [object](https://learn.microsoft.com/dotnet/api/system.object)[] + +Optional Parameter. + +## Returns + +[int](https://learn.microsoft.com/dotnet/api/system.int32) + +Return a fake number to confuse you. + +## Type Parameters + +`T` + +Fake para + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.IAnimal.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.IAnimal.verified.md new file mode 100644 index 00000000000..1f40e24fba2 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.IAnimal.verified.md @@ -0,0 +1,81 @@ +# Interface IAnimal + +_Namespace:_ [CatLibrary](CatLibrary.md) +_Assembly:_ CatLibrary.dll + +This is basic interface of all animal. + +```csharp +public interface IAnimal +``` + +## Properties + +### Name + +Name of Animal. + +```csharp +string Name { get; } +``` + +Property Value + +[string](https://learn.microsoft.com/dotnet/api/system.string) + +### this[int] + +Return specific number animal's name. + +```csharp +string this[int index] { get; } +``` + +Property Value + +[string](https://learn.microsoft.com/dotnet/api/system.string) + +## Methods + +### Eat() + +Animal's eat method. + +```csharp +void Eat() +``` + +### Eat(Tool) + +Overload method of eat. This define the animal eat by which tool. + +```csharp +void Eat(Tool tool) where Tool : class +``` + +#### Parameters + +`tool` Tool + +Tool name. + +#### Type Parameters + +`Tool` + +It's a class type. + +### Eat(string) + +Feed the animal with some food + +```csharp +void Eat(string food) +``` + +#### Parameters + +`food` [string](https://learn.microsoft.com/dotnet/api/system.string) + +Food to eat + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICat.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICat.verified.md new file mode 100644 index 00000000000..eb6709a23ae --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICat.verified.md @@ -0,0 +1,34 @@ +# Interface ICat + +_Namespace:_ [CatLibrary](CatLibrary.md) +_Assembly:_ CatLibrary.dll + +Cat's interface + +```csharp +public interface ICat : IAnimal +``` + +#### Implements + +[IAnimal](CatLibrary.IAnimal.md) + +#### Extension Methods + +[ICatExtension.Play(ICat, ContainersRefType.ColorType)](CatLibrary.ICatExtension.md#CatLibrary.ICatExtension.Play(CatLibrary.Core.ContainersRefType.ColorType)), +[ICatExtension.Sleep(ICat, long)](CatLibrary.ICatExtension.md#CatLibrary.ICatExtension.Sleep(System.Int64)) + +## Events + +### eat + +eat event of cat. Every cat must implement this event. + +```csharp +event EventHandler eat +``` + +Event Type + +[EventHandler](https://learn.microsoft.com/dotnet/api/system.eventhandler) + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICatExtension.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICatExtension.verified.md new file mode 100644 index 00000000000..022f7e762ff --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICatExtension.verified.md @@ -0,0 +1,66 @@ +# Class ICatExtension + +_Namespace:_ [CatLibrary](CatLibrary.md) +_Assembly:_ CatLibrary.dll + +It's the class that contains ICat interface's extension method. +

This class must be public and static.

+

Also it shouldn't be a geneic class

+ +```csharp +public static class ICatExtension +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[ICatExtension](CatLibrary.ICatExtension.md) + +#### Inherited Members + +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + +## Methods + +### Play(ICat, ColorType) + +Extension method to let cat play + +```csharp +public static void Play(this ICat icat, ContainersRefType.ColorType toy) +``` + +#### Parameters + +`icat` [ICat](CatLibrary.ICat.md) + +Cat + +`toy` [ContainersRefType](CatLibrary.Core.ContainersRefType.md).[ColorType](CatLibrary.Core.ContainersRefType.ColorType.md) + +Something to play + +### Sleep(ICat, long) + +Extension method hint that how long the cat can sleep. + +```csharp +public static void Sleep(this ICat icat, long hours) +``` + +#### Parameters + +`icat` [ICat](CatLibrary.ICat.md) + +The type will be extended. + +`hours` [long](https://learn.microsoft.com/dotnet/api/system.int64) + +The length of sleep. + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefDelegate`3.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefDelegate`3.verified.md new file mode 100644 index 00000000000..4b685fd515e --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefDelegate`3.verified.md @@ -0,0 +1,39 @@ +# Delegate MRefDelegate + +_Namespace:_ [CatLibrary](CatLibrary.md) +_Assembly:_ CatLibrary.dll + +Generic delegate with many constrains. + +```csharp +public delegate void MRefDelegate(K k, T t, L l) where K : class, IComparable where T : struct where L : Tom, IEnumerable +``` + +## Parameters + +`k` K + +Type K. + +`t` T + +Type T. + +`l` L + +Type L. + +## Type Parameters + +`K` + +Generic K. + +`T` + +Generic T. + +`L` + +Generic L. + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefNormalDelegate.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefNormalDelegate.verified.md new file mode 100644 index 00000000000..7c51bd4cfa2 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefNormalDelegate.verified.md @@ -0,0 +1,21 @@ +# Delegate MRefNormalDelegate + +_Namespace:_ [CatLibrary](CatLibrary.md) +_Assembly:_ CatLibrary.dll + +Delegate in the namespace + +```csharp +public delegate void MRefNormalDelegate(List pics, out string name) +``` + +## Parameters + +`pics` [List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)<[string](https://learn.microsoft.com/dotnet/api/system.string)> + +a name list of pictures. + +`name` [string](https://learn.microsoft.com/dotnet/api/system.string) + +give out the needed name. + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Tom.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Tom.verified.md new file mode 100644 index 00000000000..aa836436cc5 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Tom.verified.md @@ -0,0 +1,70 @@ +# Class Tom + +_Namespace:_ [CatLibrary](CatLibrary.md) +_Assembly:_ CatLibrary.dll + +Tom class is only inherit from Object. Not any member inside itself. + +```csharp +public class Tom +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[Tom](CatLibrary.Tom.md) + +#### Derived + +[TomFromBaseClass](CatLibrary.TomFromBaseClass.md) + +#### Inherited Members + +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + +## Methods + +### TomMethod(Complex, Tuple) + +This is a Tom Method with complex type as return + +```csharp +public Complex TomMethod(Complex a, Tuple b) +``` + +#### Parameters + +`a` [Complex](CatLibrary.Complex-2.md)<[TomFromBaseClass](CatLibrary.TomFromBaseClass.md), [TomFromBaseClass](CatLibrary.TomFromBaseClass.md)> + +A complex input + +`b` [Tuple](https://learn.microsoft.com/dotnet/api/system.tuple-2)<[string](https://learn.microsoft.com/dotnet/api/system.string), [Tom](CatLibrary.Tom.md)> + +Another complex input + +#### Returns + +[Complex](CatLibrary.Complex-2.md)<[string](https://learn.microsoft.com/dotnet/api/system.string), [TomFromBaseClass](CatLibrary.TomFromBaseClass.md)> + +Complex @CatLibrary.TomFromBaseClass + +#### Exceptions + +[NotImplementedException](https://learn.microsoft.com/dotnet/api/system.notimplementedexception) + +This is not implemented + +[ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) + +This is the exception to be thrown when implemented + +[CatException](CatLibrary.CatException-1.md) + +This is the exception in current documentation + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.TomFromBaseClass.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.TomFromBaseClass.verified.md new file mode 100644 index 00000000000..503e82fd834 --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.TomFromBaseClass.verified.md @@ -0,0 +1,44 @@ +# Class TomFromBaseClass + +_Namespace:_ [CatLibrary](CatLibrary.md) +_Assembly:_ CatLibrary.dll + +*TomFromBaseClass* inherits from @ + +```csharp +public class TomFromBaseClass : Tom +``` + +#### Inheritance + +[object](https://learn.microsoft.com/dotnet/api/system.object) ← +[Tom](CatLibrary.Tom.md) ← +[TomFromBaseClass](CatLibrary.TomFromBaseClass.md) + +#### Inherited Members + +[Tom.TomMethod(Complex, Tuple)](CatLibrary.Tom.md#CatLibrary.Tom.TomMethod(CatLibrary.Complex{CatLibrary.TomFromBaseClass,CatLibrary.TomFromBaseClass},System.Tuple{System.String,CatLibrary.Tom})), +[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), +[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), +[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), +[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), +[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), +[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), +[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) + +## Constructors + +### TomFromBaseClass(int) + +This is a #ctor with parameter + +```csharp +public TomFromBaseClass(int k) +``` + +#### Parameters + +`k` [int](https://learn.microsoft.com/dotnet/api/system.int32) + + + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/MRef.Demo.Enumeration.ColorType.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/MRef.Demo.Enumeration.ColorType.verified.md new file mode 100644 index 00000000000..f765c0320fd --- /dev/null +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/MRef.Demo.Enumeration.ColorType.verified.md @@ -0,0 +1,36 @@ +# Enum ColorType + +_Namespace:_ [MRef](MRef.md).[Demo](MRef.Demo.md).[Enumeration](MRef.Demo.Enumeration.md) +_Assembly:_ CatLibrary.dll + +Enumeration ColorType + +```csharp +public enum ColorType +``` + +## Fields + +### `Red = 0` + +this color is red + +### `Blue = 1` + +blue like river + +### `Yellow = 2` + +yellow comes from desert + +## Remarks + +

+Red/Blue/Yellow can become all color you want. +

+
    + +## See Also + +[object](https://learn.microsoft.com/dotnet/api/system.object) + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.cs b/test/docfx.Snapshot.Tests/SamplesTest.cs index 7a6dd941a7b..aa992258ca0 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.cs +++ b/test/docfx.Snapshot.Tests/SamplesTest.cs @@ -187,9 +187,9 @@ public async Task SeedMarkdown() var samplePath = $"{s_samplesDir}/seed"; Clean(samplePath); - Program.Main(new[] { "metadata", $"{samplePath}/docfx.json", "--outputFormat", "markdown" }); + Program.Main(new[] { "metadata", $"{samplePath}/docfx.json", "--outputFormat", "markdown", "--output", nameof(SeedMarkdown) }); - await VerifyDirectory($"{samplePath}/_site", IncludeFile, fileScrubber: ScrubFile).AutoVerify(includeBuildServer: false); + await VerifyDirectory($"{nameof(SeedMarkdown)}/obj/api", IncludeFile, fileScrubber: ScrubFile).AutoVerify(includeBuildServer: false); } [SnapshotFact] From 6b0f6f1a9b3f45c11f2e4288300002a6fc9bfcc6 Mon Sep 17 00:00:00 2001 From: Yufei Huang Date: Thu, 21 Sep 2023 17:47:01 +0800 Subject: [PATCH 3/9] publish seed markdown to gh pages for preview --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18fe14053ed..007966caec1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,6 +45,7 @@ jobs: - run: dotnet run -c Release --no-build -f net8.0 --project src/docfx -- metadata samples/seed/docfx.json - run: dotnet run -c Release --no-build -f net8.0 --project src/docfx -- build samples/seed/docfx.json --output docs/_site/seed + - run: dotnet run -c Release --no-build -f net8.0 --project src/docfx -- metadata samples/seed/docfx.json --outputFormat markdown --output docs/_site/seed/md - uses: actions/upload-artifact@v3 if: matrix.os == 'ubuntu-latest' From b2bf6b050a29670cb78a57c3460c9b038bf91d86 Mon Sep 17 00:00:00 2001 From: yufeih Date: Thu, 21 Sep 2023 09:48:07 +0000 Subject: [PATCH 4/9] test(snapshot): update snapshots for 3b46445534ea21756d022145d661c592a4b13961 --- .../api/CatLibrary.Cat-2.html.view.verified.json | 4 ++-- .../docfx.Snapshot.Tests/SamplesTest.Seed/index.verified.json | 2 +- .../1920x1080/api-CatLibrary.Cat-2.html-q-cat.verified.png | 4 ++-- .../375x812/api-CatLibrary.Cat-2.html-q-cat.verified.png | 4 ++-- .../html/api-CatLibrary.Cat-2.html-q-cat.verified.html | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/docfx.Snapshot.Tests/SamplesTest.Seed/api/CatLibrary.Cat-2.html.view.verified.json b/test/docfx.Snapshot.Tests/SamplesTest.Seed/api/CatLibrary.Cat-2.html.view.verified.json index e7bda20f8f2..7cb2075eb71 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.Seed/api/CatLibrary.Cat-2.html.view.verified.json +++ b/test/docfx.Snapshot.Tests/SamplesTest.Seed/api/CatLibrary.Cat-2.html.view.verified.json @@ -2919,7 +2919,7 @@ } ] }, - "description": "

    ...

    \n" + "description": "

    ..

    \n" }, { "id": "rsr", @@ -2966,7 +2966,7 @@ } ] }, - "description": "
    \n" + "description": "

    ~~

    \n" } ], "return": { diff --git a/test/docfx.Snapshot.Tests/SamplesTest.Seed/index.verified.json b/test/docfx.Snapshot.Tests/SamplesTest.Seed/index.verified.json index d1078f8c90b..1b48f128337 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.Seed/index.verified.json +++ b/test/docfx.Snapshot.Tests/SamplesTest.Seed/index.verified.json @@ -142,7 +142,7 @@ "api/CatLibrary.Cat-2.html": { "href": "api/CatLibrary.Cat-2.html", "title": "Class Cat | docfx seed website", - "keywords": "Class Cat Namespace CatLibrary Assembly CatLibrary.dll Here's main class of this Demo. You can see mostly type of article within this class and you for more detail, please see the remarks. this class is a template class. It has two Generic parameter. they are: T and K. The extension method of this class can refer to ICatExtension class This is a class talking about CAT. NOTE This is a CAT class Refer to IAnimal to see other animals. [Serializable] public class Cat : ICat, IAnimal where T : class, new() where K : struct Type Parameters T This type should be class and can new instance. K This type is a struct type, class type can't be used for this parameter. Inheritance object Cat Implements ICat IAnimal Inherited Members object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString() Extension Methods ICatExtension.Play(ICat, ContainersRefType.ColorType) ICatExtension.Sleep(ICat, long) Examples Here's example of how to create an instance of this class. As T is limited with class and K is limited with struct. var a = new Cat(object, int)(); int catNumber = new int(); unsafe { a.GetFeetLength(catNumber); } As you see, here we bring in pointer so we need to add unsafe keyword. Remarks THIS is remarks overridden in MARKDWON file Constructors Cat() Default constructor. public Cat() Cat(string, out int, string, bool) It's a complex constructor. The parameter will have some attributes. public Cat(string nickName, out int age, string realName, bool isHealthy) Parameters nickName string it's string type. age int It's an out and ref parameter. realName string It's an out paramter. isHealthy bool It's an in parameter. Cat(T) Constructor with one generic parameter. public Cat(T ownType) Parameters ownType T This parameter type defined by class. Fields isHealthy Field with attribute. [ContextStatic] [NonSerialized] public bool isHealthy Field Value bool Properties Age Hint cat's age. protected int Age { get; set; } Property Value int this[string] This is index property of Cat. You can see that the visibility is different between get and set method. public int this[string a] { protected get; set; } Parameters a string Cat's name. Property Value int Cat's number. Name EII property. public string Name { get; } Property Value string Methods Override CalculateFood Name It's an overridden summary in markdown format This is overriding methods. You can override parameter descriptions for methods, you can even add exceptions to methods. Check the intermediate obj folder to see the data model of the generated method/class. Override Yaml header should follow the data structure. public Dictionary> CalculateFood(DateTime date) Parameters date DateTime This is overridden description for a parameter. id must be specified. Returns Dictionary> It's overridden description for return. type must be specified. Exceptions ArgumentException This is an overridden argument exception. you can add additional exception by adding different exception type. Equals(object) Override the method of Object.Equals(object obj). public override bool Equals(object obj) Parameters obj object Can pass any class type. Returns bool The return value tell you whehter the compare operation is successful. GetTailLength(int*, params object[]) It's an unsafe method. As you see, catName is a pointer, so we need to add unsafe keyword. public long GetTailLength(int* catName, params object[] parameters) Parameters catName int* Thie represent for cat name length. parameters object[] Optional parameters. Returns long Return cat tail's length. Jump(T, K, ref bool) This method have attribute above it. [Conditional(\"Debug\")] public void Jump(T ownType, K anotherOwnType, ref bool cheat) Parameters ownType T Type come from class define. anotherOwnType K Type come from class define. cheat bool Hint whether this cat has cheat mode. Exceptions ArgumentException This is an argument exception Events ownEat Eat event of this cat public event EventHandler ownEat Event Type EventHandler Operators operator +(Cat, int) Addition operator of this class. public static int operator +(Cat lsr, int rsr) Parameters lsr Cat ... rsr int Returns int Result with int type. explicit operator Tom(Cat) Expilicit operator of this class. It means this cat can evolve to change to Tom. Tom and Jerry. public static explicit operator Tom(Cat src) Parameters src Cat Instance of this class. Returns Tom Advanced class type of cat. operator -(Cat, int) Similar with operaotr +, refer to that topic. public static int operator -(Cat lsr, int rsr) Parameters lsr Cat rsr int Returns int" + "keywords": "Class Cat Namespace CatLibrary Assembly CatLibrary.dll Here's main class of this Demo. You can see mostly type of article within this class and you for more detail, please see the remarks. this class is a template class. It has two Generic parameter. they are: T and K. The extension method of this class can refer to ICatExtension class This is a class talking about CAT. NOTE This is a CAT class Refer to IAnimal to see other animals. [Serializable] public class Cat : ICat, IAnimal where T : class, new() where K : struct Type Parameters T This type should be class and can new instance. K This type is a struct type, class type can't be used for this parameter. Inheritance object Cat Implements ICat IAnimal Inherited Members object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString() Extension Methods ICatExtension.Play(ICat, ContainersRefType.ColorType) ICatExtension.Sleep(ICat, long) Examples Here's example of how to create an instance of this class. As T is limited with class and K is limited with struct. var a = new Cat(object, int)(); int catNumber = new int(); unsafe { a.GetFeetLength(catNumber); } As you see, here we bring in pointer so we need to add unsafe keyword. Remarks THIS is remarks overridden in MARKDWON file Constructors Cat() Default constructor. public Cat() Cat(string, out int, string, bool) It's a complex constructor. The parameter will have some attributes. public Cat(string nickName, out int age, string realName, bool isHealthy) Parameters nickName string it's string type. age int It's an out and ref parameter. realName string It's an out paramter. isHealthy bool It's an in parameter. Cat(T) Constructor with one generic parameter. public Cat(T ownType) Parameters ownType T This parameter type defined by class. Fields isHealthy Field with attribute. [ContextStatic] [NonSerialized] public bool isHealthy Field Value bool Properties Age Hint cat's age. protected int Age { get; set; } Property Value int this[string] This is index property of Cat. You can see that the visibility is different between get and set method. public int this[string a] { protected get; set; } Parameters a string Cat's name. Property Value int Cat's number. Name EII property. public string Name { get; } Property Value string Methods Override CalculateFood Name It's an overridden summary in markdown format This is overriding methods. You can override parameter descriptions for methods, you can even add exceptions to methods. Check the intermediate obj folder to see the data model of the generated method/class. Override Yaml header should follow the data structure. public Dictionary> CalculateFood(DateTime date) Parameters date DateTime This is overridden description for a parameter. id must be specified. Returns Dictionary> It's overridden description for return. type must be specified. Exceptions ArgumentException This is an overridden argument exception. you can add additional exception by adding different exception type. Equals(object) Override the method of Object.Equals(object obj). public override bool Equals(object obj) Parameters obj object Can pass any class type. Returns bool The return value tell you whehter the compare operation is successful. GetTailLength(int*, params object[]) It's an unsafe method. As you see, catName is a pointer, so we need to add unsafe keyword. public long GetTailLength(int* catName, params object[] parameters) Parameters catName int* Thie represent for cat name length. parameters object[] Optional parameters. Returns long Return cat tail's length. Jump(T, K, ref bool) This method have attribute above it. [Conditional(\"Debug\")] public void Jump(T ownType, K anotherOwnType, ref bool cheat) Parameters ownType T Type come from class define. anotherOwnType K Type come from class define. cheat bool Hint whether this cat has cheat mode. Exceptions ArgumentException This is an argument exception Events ownEat Eat event of this cat public event EventHandler ownEat Event Type EventHandler Operators operator +(Cat, int) Addition operator of this class. public static int operator +(Cat lsr, int rsr) Parameters lsr Cat .. rsr int ~~ Returns int Result with int type. explicit operator Tom(Cat) Expilicit operator of this class. It means this cat can evolve to change to Tom. Tom and Jerry. public static explicit operator Tom(Cat src) Parameters src Cat Instance of this class. Returns Tom Advanced class type of cat. operator -(Cat, int) Similar with operaotr +, refer to that topic. public static int operator -(Cat lsr, int rsr) Parameters lsr Cat rsr int Returns int" }, "api/CatLibrary.CatException-1.html": { "href": "api/CatLibrary.CatException-1.html", diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/1920x1080/api-CatLibrary.Cat-2.html-q-cat.verified.png b/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/1920x1080/api-CatLibrary.Cat-2.html-q-cat.verified.png index 589c2a50e8b..fcfa7eb9cd6 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/1920x1080/api-CatLibrary.Cat-2.html-q-cat.verified.png +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/1920x1080/api-CatLibrary.Cat-2.html-q-cat.verified.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c29d9342e3b4f0864c69cc39d180220ad9c23812f4c640e2c2e916f6a81648a5 -size 833585 +oid sha256:59ee74ccd82718f570dab2d46ad3edb964e31bab1fa4290499ad22b4f4cb3e8b +size 833782 diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/375x812/api-CatLibrary.Cat-2.html-q-cat.verified.png b/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/375x812/api-CatLibrary.Cat-2.html-q-cat.verified.png index 61b1bfe10e0..aa9527fa2c1 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/375x812/api-CatLibrary.Cat-2.html-q-cat.verified.png +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/375x812/api-CatLibrary.Cat-2.html-q-cat.verified.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef3fde1c7d93a26dcd5420bb8302efdaf6cff5d4adf7cfdb2c81804b9dd70992 -size 666999 +oid sha256:0f6a324253066a96de94c3576acf96a2c231fe22985daece1b84edae30341d1a +size 667145 diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/api-CatLibrary.Cat-2.html-q-cat.verified.html b/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/api-CatLibrary.Cat-2.html-q-cat.verified.html index 5f2b20a5acd..94d19d2381b 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/api-CatLibrary.Cat-2.html-q-cat.verified.html +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/api-CatLibrary.Cat-2.html-q-cat.verified.html @@ -958,10 +958,10 @@

    Parameters

    lsr Cat<T, K>
    -

    ...

    +

    ..

    rsr int
    -
    +

    ~~

    From 51dbd80f4df1e3c011b68e57e8da2dfc5ee3de2d Mon Sep 17 00:00:00 2001 From: Yufei Huang Date: Thu, 21 Sep 2023 17:53:01 +0800 Subject: [PATCH 5/9] separate ns and assembly as two lines --- src/Docfx.Dotnet/MarkdownFormatter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Docfx.Dotnet/MarkdownFormatter.cs b/src/Docfx.Dotnet/MarkdownFormatter.cs index 99e0e2547c5..2345c88f56e 100644 --- a/src/Docfx.Dotnet/MarkdownFormatter.cs +++ b/src/Docfx.Dotnet/MarkdownFormatter.cs @@ -392,7 +392,7 @@ void EnumFields() void Info() { - sb.AppendLine($"_Namespace:_ {FullLink(symbol.ContainingNamespace)}"); + sb.AppendLine($"_Namespace:_ {FullLink(symbol.ContainingNamespace)}").AppendLine(); sb.AppendLine($"_Assembly:_ {symbol.ContainingAssembly.Name}.dll").AppendLine(); } From a4bd9eb2792899777374d41cbea4c1d871621df2 Mon Sep 17 00:00:00 2001 From: yufeih Date: Thu, 21 Sep 2023 09:58:19 +0000 Subject: [PATCH 6/9] test(snapshot): update snapshots for 2f52e6b0101fb123e873d2672989ebf3c6ed0f95 --- .../BuildFromAssembly.Class1.verified.md | 1 + .../BuildFromCSharpSourceCode.CSharp.verified.md | 1 + .../BuildFromProject.Class1.IIssue8948.verified.md | 1 + .../BuildFromProject.Class1.Issue8665.verified.md | 1 + .../BuildFromProject.Class1.Issue8696Attribute.verified.md | 1 + .../BuildFromProject.Class1.Issue8948.verified.md | 1 + .../BuildFromProject.Class1.Test`1.verified.md | 1 + .../SamplesTest.SeedMarkdown/BuildFromProject.Class1.verified.md | 1 + .../BuildFromProject.IInheritdoc.verified.md | 1 + .../BuildFromProject.Inheritdoc.Issue6366.Class1`1.verified.md | 1 + .../BuildFromProject.Inheritdoc.Issue6366.Class2.verified.md | 1 + .../BuildFromProject.Inheritdoc.Issue6366.verified.md | 1 + .../BuildFromProject.Inheritdoc.Issue7035.verified.md | 1 + .../BuildFromProject.Inheritdoc.Issue7484.verified.md | 1 + .../BuildFromProject.Inheritdoc.Issue8101.verified.md | 1 + .../BuildFromProject.Inheritdoc.Issue8129.verified.md | 1 + .../BuildFromProject.Inheritdoc.verified.md | 1 + .../BuildFromProject.Issue8540.A.A.verified.md | 1 + .../BuildFromProject.Issue8540.B.B.verified.md | 1 + .../BuildFromVBSourceCode.BaseClass1.verified.md | 1 + .../BuildFromVBSourceCode.Class1.verified.md | 1 + .../CatLibrary.CatException`1.verified.md | 1 + .../SamplesTest.SeedMarkdown/CatLibrary.Cat`2.verified.md | 1 + .../SamplesTest.SeedMarkdown/CatLibrary.Complex`2.verified.md | 1 + .../CatLibrary.Core.ContainersRefType.ColorType.verified.md | 1 + ...ary.Core.ContainersRefType.ContainersRefTypeChild.verified.md | 1 + ...ContainersRefType.ContainersRefTypeChildInterface.verified.md | 1 + ....Core.ContainersRefType.ContainersRefTypeDelegate.verified.md | 1 + .../CatLibrary.Core.ContainersRefType.verified.md | 1 + .../CatLibrary.Core.ExplicitLayoutClass.verified.md | 1 + .../CatLibrary.Core.Issue231.verified.md | 1 + .../CatLibrary.FakeDelegate`1.verified.md | 1 + .../SamplesTest.SeedMarkdown/CatLibrary.IAnimal.verified.md | 1 + .../SamplesTest.SeedMarkdown/CatLibrary.ICat.verified.md | 1 + .../CatLibrary.ICatExtension.verified.md | 1 + .../CatLibrary.MRefDelegate`3.verified.md | 1 + .../CatLibrary.MRefNormalDelegate.verified.md | 1 + .../SamplesTest.SeedMarkdown/CatLibrary.Tom.verified.md | 1 + .../CatLibrary.TomFromBaseClass.verified.md | 1 + .../MRef.Demo.Enumeration.ColorType.verified.md | 1 + 40 files changed, 40 insertions(+) diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromAssembly.Class1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromAssembly.Class1.verified.md index 123999da330..4011d0b5861 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromAssembly.Class1.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromAssembly.Class1.verified.md @@ -1,6 +1,7 @@ # Class Class1 _Namespace:_ [BuildFromAssembly](BuildFromAssembly.md) + _Assembly:_ BuildFromAssembly.dll This is a test class. diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromCSharpSourceCode.CSharp.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromCSharpSourceCode.CSharp.verified.md index b566fd62445..778f206a996 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromCSharpSourceCode.CSharp.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromCSharpSourceCode.CSharp.verified.md @@ -1,6 +1,7 @@ # Class CSharp _Namespace:_ [BuildFromCSharpSourceCode](BuildFromCSharpSourceCode.md) + _Assembly:_ ?.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.IIssue8948.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.IIssue8948.verified.md index 1afefce79c2..3e1ce9cfdc7 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.IIssue8948.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.IIssue8948.verified.md @@ -1,6 +1,7 @@ # Interface IIssue8948 _Namespace:_ [BuildFromProject](BuildFromProject.md) + _Assembly:_ BuildFromProject.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8665.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8665.verified.md index 3515b326dd6..f822203fce7 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8665.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8665.verified.md @@ -1,6 +1,7 @@ # Class Issue8665 _Namespace:_ [BuildFromProject](BuildFromProject.md) + _Assembly:_ BuildFromProject.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8696Attribute.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8696Attribute.verified.md index 4484bd40c62..482126308ba 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8696Attribute.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8696Attribute.verified.md @@ -1,6 +1,7 @@ # Class Issue8696Attribute _Namespace:_ [BuildFromProject](BuildFromProject.md) + _Assembly:_ BuildFromProject.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8948.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8948.verified.md index 5b186a4ad4f..2656f6771ef 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8948.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8948.verified.md @@ -1,6 +1,7 @@ # Class Issue8948 _Namespace:_ [BuildFromProject](BuildFromProject.md) + _Assembly:_ BuildFromProject.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Test`1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Test`1.verified.md index b9356894c52..58636791aff 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Test`1.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Test`1.verified.md @@ -1,6 +1,7 @@ # Class Test _Namespace:_ [BuildFromProject](BuildFromProject.md) + _Assembly:_ BuildFromProject.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.verified.md index 65dd110400b..53c16403b91 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.verified.md @@ -1,6 +1,7 @@ # Class Class1 _Namespace:_ [BuildFromProject](BuildFromProject.md) + _Assembly:_ BuildFromProject.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.IInheritdoc.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.IInheritdoc.verified.md index 17239e8e14d..6fa852dea6f 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.IInheritdoc.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.IInheritdoc.verified.md @@ -1,6 +1,7 @@ # Interface IInheritdoc _Namespace:_ [BuildFromProject](BuildFromProject.md) + _Assembly:_ BuildFromProject.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class1`1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class1`1.verified.md index c39c7a36890..410f89caad7 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class1`1.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class1`1.verified.md @@ -1,6 +1,7 @@ # Class Class1 _Namespace:_ [BuildFromProject](BuildFromProject.md) + _Assembly:_ BuildFromProject.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class2.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class2.verified.md index 2050b2842bb..493bc10be37 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class2.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class2.verified.md @@ -1,6 +1,7 @@ # Class Class2 _Namespace:_ [BuildFromProject](BuildFromProject.md) + _Assembly:_ BuildFromProject.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.verified.md index 1a00b813af9..ae7dd1272df 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.verified.md @@ -1,6 +1,7 @@ # Class Issue6366 _Namespace:_ [BuildFromProject](BuildFromProject.md) + _Assembly:_ BuildFromProject.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7035.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7035.verified.md index 32d62a5aa28..a63876e8913 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7035.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7035.verified.md @@ -1,6 +1,7 @@ # Class Issue7035 _Namespace:_ [BuildFromProject](BuildFromProject.md) + _Assembly:_ BuildFromProject.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7484.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7484.verified.md index 53fa34a0cf7..78ecd102a9a 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7484.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7484.verified.md @@ -1,6 +1,7 @@ # Class Issue7484 _Namespace:_ [BuildFromProject](BuildFromProject.md) + _Assembly:_ BuildFromProject.dll This is a test class to have something for DocFX to document. diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8101.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8101.verified.md index f062603e841..bd2ea8393bb 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8101.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8101.verified.md @@ -1,6 +1,7 @@ # Class Issue8101 _Namespace:_ [BuildFromProject](BuildFromProject.md) + _Assembly:_ BuildFromProject.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8129.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8129.verified.md index 3c39ae1f14c..d4ece69e35d 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8129.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8129.verified.md @@ -1,6 +1,7 @@ # Struct Issue8129 _Namespace:_ [BuildFromProject](BuildFromProject.md) + _Assembly:_ BuildFromProject.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.verified.md index 3d4f2700a0e..f096cce8e31 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.verified.md @@ -1,6 +1,7 @@ # Class Inheritdoc _Namespace:_ [BuildFromProject](BuildFromProject.md) + _Assembly:_ BuildFromProject.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.A.A.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.A.A.verified.md index 1a6cd162fec..4a55bcded91 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.A.A.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.A.A.verified.md @@ -1,6 +1,7 @@ # Class A _Namespace:_ [BuildFromProject](BuildFromProject.md).[Issue8540](BuildFromProject.Issue8540.md).[A](BuildFromProject.Issue8540.A.md) + _Assembly:_ BuildFromProject.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.B.B.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.B.B.verified.md index 48caec9aeaf..c961a3cf231 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.B.B.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.B.B.verified.md @@ -1,6 +1,7 @@ # Class B _Namespace:_ [BuildFromProject](BuildFromProject.md).[Issue8540](BuildFromProject.Issue8540.md).[B](BuildFromProject.Issue8540.B.md) + _Assembly:_ BuildFromProject.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.BaseClass1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.BaseClass1.verified.md index 8c878f493eb..3862ea9e145 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.BaseClass1.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.BaseClass1.verified.md @@ -1,6 +1,7 @@ # Class BaseClass1 _Namespace:_ [BuildFromVBSourceCode](BuildFromVBSourceCode.md) + _Assembly:_ ?.dll This is the BaseClass diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.Class1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.Class1.verified.md index 6f790d5e7fe..fc4ba294acf 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.Class1.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.Class1.verified.md @@ -1,6 +1,7 @@ # Class Class1 _Namespace:_ [BuildFromVBSourceCode](BuildFromVBSourceCode.md) + _Assembly:_ ?.dll This is summary from vb class... diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.CatException`1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.CatException`1.verified.md index 51dc1f63708..df1895ea59f 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.CatException`1.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.CatException`1.verified.md @@ -1,6 +1,7 @@ # Class CatException _Namespace:_ [CatLibrary](CatLibrary.md) + _Assembly:_ CatLibrary.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Cat`2.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Cat`2.verified.md index f55fde9ba65..3f3f77f75e8 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Cat`2.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Cat`2.verified.md @@ -1,6 +1,7 @@ # Class Cat _Namespace:_ [CatLibrary](CatLibrary.md) + _Assembly:_ CatLibrary.dll

    Here's main class of this Demo.

    diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Complex`2.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Complex`2.verified.md index ff9e097d736..3b37ca55edc 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Complex`2.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Complex`2.verified.md @@ -1,6 +1,7 @@ # Class Complex _Namespace:_ [CatLibrary](CatLibrary.md) + _Assembly:_ CatLibrary.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ColorType.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ColorType.verified.md index f49c95218f4..57f87fc22b1 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ColorType.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ColorType.verified.md @@ -1,6 +1,7 @@ # Enum ColorType _Namespace:_ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) + _Assembly:_ CatLibrary.Core.dll Enumeration ColorType diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChild.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChild.verified.md index 9a8742c3b59..c49c87b003f 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChild.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChild.verified.md @@ -1,6 +1,7 @@ # Class ContainersRefTypeChild _Namespace:_ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) + _Assembly:_ CatLibrary.Core.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChildInterface.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChildInterface.verified.md index e1a7b1329e4..1eb8309d5d7 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChildInterface.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChildInterface.verified.md @@ -1,6 +1,7 @@ # Interface ContainersRefTypeChildInterface _Namespace:_ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) + _Assembly:_ CatLibrary.Core.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeDelegate.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeDelegate.verified.md index dbbfdf5ed69..34214061a07 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeDelegate.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeDelegate.verified.md @@ -1,6 +1,7 @@ # Delegate ContainersRefTypeDelegate _Namespace:_ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) + _Assembly:_ CatLibrary.Core.dll Delegate ContainersRefTypeDelegate diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.verified.md index c9e93e04992..838755fe83a 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.verified.md @@ -1,6 +1,7 @@ # Struct ContainersRefType _Namespace:_ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) + _Assembly:_ CatLibrary.Core.dll Struct ContainersRefType diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ExplicitLayoutClass.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ExplicitLayoutClass.verified.md index 8bb145a4637..87b4fec69d2 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ExplicitLayoutClass.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ExplicitLayoutClass.verified.md @@ -1,6 +1,7 @@ # Class ExplicitLayoutClass _Namespace:_ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) + _Assembly:_ CatLibrary.Core.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.Issue231.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.Issue231.verified.md index 257cb27990a..c8a203eacff 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.Issue231.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.Issue231.verified.md @@ -1,6 +1,7 @@ # Class Issue231 _Namespace:_ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) + _Assembly:_ CatLibrary.Core.dll ```csharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.FakeDelegate`1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.FakeDelegate`1.verified.md index c23803d0682..c462a839900 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.FakeDelegate`1.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.FakeDelegate`1.verified.md @@ -1,6 +1,7 @@ # Delegate FakeDelegate _Namespace:_ [CatLibrary](CatLibrary.md) + _Assembly:_ CatLibrary.dll Fake delegate diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.IAnimal.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.IAnimal.verified.md index 1f40e24fba2..203d8181e00 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.IAnimal.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.IAnimal.verified.md @@ -1,6 +1,7 @@ # Interface IAnimal _Namespace:_ [CatLibrary](CatLibrary.md) + _Assembly:_ CatLibrary.dll This is basic interface of all animal. diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICat.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICat.verified.md index eb6709a23ae..3041cef4419 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICat.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICat.verified.md @@ -1,6 +1,7 @@ # Interface ICat _Namespace:_ [CatLibrary](CatLibrary.md) + _Assembly:_ CatLibrary.dll Cat's interface diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICatExtension.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICatExtension.verified.md index 022f7e762ff..6956e46160a 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICatExtension.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICatExtension.verified.md @@ -1,6 +1,7 @@ # Class ICatExtension _Namespace:_ [CatLibrary](CatLibrary.md) + _Assembly:_ CatLibrary.dll It's the class that contains ICat interface's extension method. diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefDelegate`3.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefDelegate`3.verified.md index 4b685fd515e..d2b5915d2de 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefDelegate`3.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefDelegate`3.verified.md @@ -1,6 +1,7 @@ # Delegate MRefDelegate _Namespace:_ [CatLibrary](CatLibrary.md) + _Assembly:_ CatLibrary.dll Generic delegate with many constrains. diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefNormalDelegate.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefNormalDelegate.verified.md index 7c51bd4cfa2..a9faad7949c 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefNormalDelegate.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefNormalDelegate.verified.md @@ -1,6 +1,7 @@ # Delegate MRefNormalDelegate _Namespace:_ [CatLibrary](CatLibrary.md) + _Assembly:_ CatLibrary.dll Delegate in the namespace diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Tom.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Tom.verified.md index aa836436cc5..7114da44912 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Tom.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Tom.verified.md @@ -1,6 +1,7 @@ # Class Tom _Namespace:_ [CatLibrary](CatLibrary.md) + _Assembly:_ CatLibrary.dll Tom class is only inherit from Object. Not any member inside itself. diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.TomFromBaseClass.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.TomFromBaseClass.verified.md index 503e82fd834..9d63ef5e715 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.TomFromBaseClass.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.TomFromBaseClass.verified.md @@ -1,6 +1,7 @@ # Class TomFromBaseClass _Namespace:_ [CatLibrary](CatLibrary.md) + _Assembly:_ CatLibrary.dll *TomFromBaseClass* inherits from @ diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/MRef.Demo.Enumeration.ColorType.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/MRef.Demo.Enumeration.ColorType.verified.md index f765c0320fd..c3a21a149cc 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/MRef.Demo.Enumeration.ColorType.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/MRef.Demo.Enumeration.ColorType.verified.md @@ -1,6 +1,7 @@ # Enum ColorType _Namespace:_ [MRef](MRef.md).[Demo](MRef.Demo.md).[Enumeration](MRef.Demo.Enumeration.md) + _Assembly:_ CatLibrary.dll Enumeration ColorType From a7cbf8654ea2dfd57ed3088a38f4acd124ec3f87 Mon Sep 17 00:00:00 2001 From: Yufei Huang Date: Thu, 21 Sep 2023 18:07:54 +0800 Subject: [PATCH 7/9] use soft break for info --- src/Docfx.Dotnet/MarkdownFormatter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Docfx.Dotnet/MarkdownFormatter.cs b/src/Docfx.Dotnet/MarkdownFormatter.cs index 2345c88f56e..c0829f171de 100644 --- a/src/Docfx.Dotnet/MarkdownFormatter.cs +++ b/src/Docfx.Dotnet/MarkdownFormatter.cs @@ -392,8 +392,8 @@ void EnumFields() void Info() { - sb.AppendLine($"_Namespace:_ {FullLink(symbol.ContainingNamespace)}").AppendLine(); - sb.AppendLine($"_Assembly:_ {symbol.ContainingAssembly.Name}.dll").AppendLine(); + sb.AppendLine($"__Namespace:__ {FullLink(symbol.ContainingNamespace)} "); + sb.AppendLine($"__Assembly:__ {symbol.ContainingAssembly.Name}.dll").AppendLine(); } void Summary(XmlComment? comment) From 78c155422861b18b56700e34617985835e869f8d Mon Sep 17 00:00:00 2001 From: yufeih Date: Thu, 21 Sep 2023 10:14:49 +0000 Subject: [PATCH 8/9] test(snapshot): update snapshots for 7ebfed10487aef28cf049e4736659ec0c053a169 --- .../BuildFromAssembly.Class1.verified.md | 5 ++--- .../BuildFromCSharpSourceCode.CSharp.verified.md | 5 ++--- .../BuildFromProject.Class1.IIssue8948.verified.md | 5 ++--- .../BuildFromProject.Class1.Issue8665.verified.md | 5 ++--- .../BuildFromProject.Class1.Issue8696Attribute.verified.md | 5 ++--- .../BuildFromProject.Class1.Issue8948.verified.md | 5 ++--- .../BuildFromProject.Class1.Test`1.verified.md | 5 ++--- .../BuildFromProject.Class1.verified.md | 5 ++--- .../BuildFromProject.IInheritdoc.verified.md | 5 ++--- ...uildFromProject.Inheritdoc.Issue6366.Class1`1.verified.md | 5 ++--- .../BuildFromProject.Inheritdoc.Issue6366.Class2.verified.md | 5 ++--- .../BuildFromProject.Inheritdoc.Issue6366.verified.md | 5 ++--- .../BuildFromProject.Inheritdoc.Issue7035.verified.md | 5 ++--- .../BuildFromProject.Inheritdoc.Issue7484.verified.md | 5 ++--- .../BuildFromProject.Inheritdoc.Issue8101.verified.md | 5 ++--- .../BuildFromProject.Inheritdoc.Issue8129.verified.md | 5 ++--- .../BuildFromProject.Inheritdoc.verified.md | 5 ++--- .../BuildFromProject.Issue8540.A.A.verified.md | 5 ++--- .../BuildFromProject.Issue8540.B.B.verified.md | 5 ++--- .../BuildFromVBSourceCode.BaseClass1.verified.md | 5 ++--- .../BuildFromVBSourceCode.Class1.verified.md | 5 ++--- .../CatLibrary.CatException`1.verified.md | 5 ++--- .../SamplesTest.SeedMarkdown/CatLibrary.Cat`2.verified.md | 5 ++--- .../CatLibrary.Complex`2.verified.md | 5 ++--- .../CatLibrary.Core.ContainersRefType.ColorType.verified.md | 5 ++--- ...Core.ContainersRefType.ContainersRefTypeChild.verified.md | 5 ++--- ...ainersRefType.ContainersRefTypeChildInterface.verified.md | 5 ++--- ...e.ContainersRefType.ContainersRefTypeDelegate.verified.md | 5 ++--- .../CatLibrary.Core.ContainersRefType.verified.md | 5 ++--- .../CatLibrary.Core.ExplicitLayoutClass.verified.md | 5 ++--- .../CatLibrary.Core.Issue231.verified.md | 5 ++--- .../CatLibrary.FakeDelegate`1.verified.md | 5 ++--- .../SamplesTest.SeedMarkdown/CatLibrary.IAnimal.verified.md | 5 ++--- .../SamplesTest.SeedMarkdown/CatLibrary.ICat.verified.md | 5 ++--- .../CatLibrary.ICatExtension.verified.md | 5 ++--- .../CatLibrary.MRefDelegate`3.verified.md | 5 ++--- .../CatLibrary.MRefNormalDelegate.verified.md | 5 ++--- .../SamplesTest.SeedMarkdown/CatLibrary.Tom.verified.md | 5 ++--- .../CatLibrary.TomFromBaseClass.verified.md | 5 ++--- .../MRef.Demo.Enumeration.ColorType.verified.md | 5 ++--- 40 files changed, 80 insertions(+), 120 deletions(-) diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromAssembly.Class1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromAssembly.Class1.verified.md index 4011d0b5861..63d829f019b 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromAssembly.Class1.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromAssembly.Class1.verified.md @@ -1,8 +1,7 @@ # Class Class1 -_Namespace:_ [BuildFromAssembly](BuildFromAssembly.md) - -_Assembly:_ BuildFromAssembly.dll +__Namespace:__ [BuildFromAssembly](BuildFromAssembly.md) +__Assembly:__ BuildFromAssembly.dll This is a test class. diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromCSharpSourceCode.CSharp.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromCSharpSourceCode.CSharp.verified.md index 778f206a996..ccd81696ee2 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromCSharpSourceCode.CSharp.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromCSharpSourceCode.CSharp.verified.md @@ -1,8 +1,7 @@ # Class CSharp -_Namespace:_ [BuildFromCSharpSourceCode](BuildFromCSharpSourceCode.md) - -_Assembly:_ ?.dll +__Namespace:__ [BuildFromCSharpSourceCode](BuildFromCSharpSourceCode.md) +__Assembly:__ ?.dll ```csharp public class CSharp diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.IIssue8948.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.IIssue8948.verified.md index 3e1ce9cfdc7..c6b63e6eaeb 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.IIssue8948.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.IIssue8948.verified.md @@ -1,8 +1,7 @@ # Interface IIssue8948 -_Namespace:_ [BuildFromProject](BuildFromProject.md) - -_Assembly:_ BuildFromProject.dll +__Namespace:__ [BuildFromProject](BuildFromProject.md) +__Assembly:__ BuildFromProject.dll ```csharp public interface Class1.IIssue8948 diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8665.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8665.verified.md index f822203fce7..a2a491bdffb 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8665.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8665.verified.md @@ -1,8 +1,7 @@ # Class Issue8665 -_Namespace:_ [BuildFromProject](BuildFromProject.md) - -_Assembly:_ BuildFromProject.dll +__Namespace:__ [BuildFromProject](BuildFromProject.md) +__Assembly:__ BuildFromProject.dll ```csharp public class Class1.Issue8665 diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8696Attribute.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8696Attribute.verified.md index 482126308ba..b46db8fb7ab 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8696Attribute.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8696Attribute.verified.md @@ -1,8 +1,7 @@ # Class Issue8696Attribute -_Namespace:_ [BuildFromProject](BuildFromProject.md) - -_Assembly:_ BuildFromProject.dll +__Namespace:__ [BuildFromProject](BuildFromProject.md) +__Assembly:__ BuildFromProject.dll ```csharp public class Class1.Issue8696Attribute : Attribute diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8948.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8948.verified.md index 2656f6771ef..80b15d1e0f9 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8948.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Issue8948.verified.md @@ -1,8 +1,7 @@ # Class Issue8948 -_Namespace:_ [BuildFromProject](BuildFromProject.md) - -_Assembly:_ BuildFromProject.dll +__Namespace:__ [BuildFromProject](BuildFromProject.md) +__Assembly:__ BuildFromProject.dll ```csharp public class Class1.Issue8948 : Class1.IIssue8948 diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Test`1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Test`1.verified.md index 58636791aff..eee245bac31 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Test`1.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.Test`1.verified.md @@ -1,8 +1,7 @@ # Class Test -_Namespace:_ [BuildFromProject](BuildFromProject.md) - -_Assembly:_ BuildFromProject.dll +__Namespace:__ [BuildFromProject](BuildFromProject.md) +__Assembly:__ BuildFromProject.dll ```csharp public class Class1.Test diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.verified.md index 53c16403b91..a44736a79be 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Class1.verified.md @@ -1,8 +1,7 @@ # Class Class1 -_Namespace:_ [BuildFromProject](BuildFromProject.md) - -_Assembly:_ BuildFromProject.dll +__Namespace:__ [BuildFromProject](BuildFromProject.md) +__Assembly:__ BuildFromProject.dll ```csharp public class Class1 : IClass1 diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.IInheritdoc.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.IInheritdoc.verified.md index 6fa852dea6f..62905115234 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.IInheritdoc.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.IInheritdoc.verified.md @@ -1,8 +1,7 @@ # Interface IInheritdoc -_Namespace:_ [BuildFromProject](BuildFromProject.md) - -_Assembly:_ BuildFromProject.dll +__Namespace:__ [BuildFromProject](BuildFromProject.md) +__Assembly:__ BuildFromProject.dll ```csharp public interface IInheritdoc diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class1`1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class1`1.verified.md index 410f89caad7..2f1c7451230 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class1`1.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class1`1.verified.md @@ -1,8 +1,7 @@ # Class Class1 -_Namespace:_ [BuildFromProject](BuildFromProject.md) - -_Assembly:_ BuildFromProject.dll +__Namespace:__ [BuildFromProject](BuildFromProject.md) +__Assembly:__ BuildFromProject.dll ```csharp public abstract class Inheritdoc.Issue6366.Class1 diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class2.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class2.verified.md index 493bc10be37..794af3257cc 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class2.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.Class2.verified.md @@ -1,8 +1,7 @@ # Class Class2 -_Namespace:_ [BuildFromProject](BuildFromProject.md) - -_Assembly:_ BuildFromProject.dll +__Namespace:__ [BuildFromProject](BuildFromProject.md) +__Assembly:__ BuildFromProject.dll ```csharp public class Inheritdoc.Issue6366.Class2 : Inheritdoc.Issue6366.Class1 diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.verified.md index ae7dd1272df..15fbe1d726a 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue6366.verified.md @@ -1,8 +1,7 @@ # Class Issue6366 -_Namespace:_ [BuildFromProject](BuildFromProject.md) - -_Assembly:_ BuildFromProject.dll +__Namespace:__ [BuildFromProject](BuildFromProject.md) +__Assembly:__ BuildFromProject.dll ```csharp public class Inheritdoc.Issue6366 diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7035.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7035.verified.md index a63876e8913..3ca38d04ac8 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7035.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7035.verified.md @@ -1,8 +1,7 @@ # Class Issue7035 -_Namespace:_ [BuildFromProject](BuildFromProject.md) - -_Assembly:_ BuildFromProject.dll +__Namespace:__ [BuildFromProject](BuildFromProject.md) +__Assembly:__ BuildFromProject.dll ```csharp public class Inheritdoc.Issue7035 diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7484.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7484.verified.md index 78ecd102a9a..2549c08c9bc 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7484.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue7484.verified.md @@ -1,8 +1,7 @@ # Class Issue7484 -_Namespace:_ [BuildFromProject](BuildFromProject.md) - -_Assembly:_ BuildFromProject.dll +__Namespace:__ [BuildFromProject](BuildFromProject.md) +__Assembly:__ BuildFromProject.dll This is a test class to have something for DocFX to document. diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8101.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8101.verified.md index bd2ea8393bb..4766af0f1e5 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8101.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8101.verified.md @@ -1,8 +1,7 @@ # Class Issue8101 -_Namespace:_ [BuildFromProject](BuildFromProject.md) - -_Assembly:_ BuildFromProject.dll +__Namespace:__ [BuildFromProject](BuildFromProject.md) +__Assembly:__ BuildFromProject.dll ```csharp public class Inheritdoc.Issue8101 diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8129.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8129.verified.md index d4ece69e35d..4eb06ed308f 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8129.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.Issue8129.verified.md @@ -1,8 +1,7 @@ # Struct Issue8129 -_Namespace:_ [BuildFromProject](BuildFromProject.md) - -_Assembly:_ BuildFromProject.dll +__Namespace:__ [BuildFromProject](BuildFromProject.md) +__Assembly:__ BuildFromProject.dll ```csharp public struct Inheritdoc.Issue8129 diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.verified.md index f096cce8e31..9be95dcc833 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Inheritdoc.verified.md @@ -1,8 +1,7 @@ # Class Inheritdoc -_Namespace:_ [BuildFromProject](BuildFromProject.md) - -_Assembly:_ BuildFromProject.dll +__Namespace:__ [BuildFromProject](BuildFromProject.md) +__Assembly:__ BuildFromProject.dll ```csharp public class Inheritdoc : IInheritdoc, IDisposable diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.A.A.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.A.A.verified.md index 4a55bcded91..cfa95ee6d65 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.A.A.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.A.A.verified.md @@ -1,8 +1,7 @@ # Class A -_Namespace:_ [BuildFromProject](BuildFromProject.md).[Issue8540](BuildFromProject.Issue8540.md).[A](BuildFromProject.Issue8540.A.md) - -_Assembly:_ BuildFromProject.dll +__Namespace:__ [BuildFromProject](BuildFromProject.md).[Issue8540](BuildFromProject.Issue8540.md).[A](BuildFromProject.Issue8540.A.md) +__Assembly:__ BuildFromProject.dll ```csharp public class A diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.B.B.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.B.B.verified.md index c961a3cf231..66fca048973 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.B.B.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromProject.Issue8540.B.B.verified.md @@ -1,8 +1,7 @@ # Class B -_Namespace:_ [BuildFromProject](BuildFromProject.md).[Issue8540](BuildFromProject.Issue8540.md).[B](BuildFromProject.Issue8540.B.md) - -_Assembly:_ BuildFromProject.dll +__Namespace:__ [BuildFromProject](BuildFromProject.md).[Issue8540](BuildFromProject.Issue8540.md).[B](BuildFromProject.Issue8540.B.md) +__Assembly:__ BuildFromProject.dll ```csharp public class B diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.BaseClass1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.BaseClass1.verified.md index 3862ea9e145..3416169a9d0 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.BaseClass1.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.BaseClass1.verified.md @@ -1,8 +1,7 @@ # Class BaseClass1 -_Namespace:_ [BuildFromVBSourceCode](BuildFromVBSourceCode.md) - -_Assembly:_ ?.dll +__Namespace:__ [BuildFromVBSourceCode](BuildFromVBSourceCode.md) +__Assembly:__ ?.dll This is the BaseClass diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.Class1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.Class1.verified.md index fc4ba294acf..a49368929ce 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.Class1.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/BuildFromVBSourceCode.Class1.verified.md @@ -1,8 +1,7 @@ # Class Class1 -_Namespace:_ [BuildFromVBSourceCode](BuildFromVBSourceCode.md) - -_Assembly:_ ?.dll +__Namespace:__ [BuildFromVBSourceCode](BuildFromVBSourceCode.md) +__Assembly:__ ?.dll This is summary from vb class... diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.CatException`1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.CatException`1.verified.md index df1895ea59f..56b8f4f1497 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.CatException`1.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.CatException`1.verified.md @@ -1,8 +1,7 @@ # Class CatException -_Namespace:_ [CatLibrary](CatLibrary.md) - -_Assembly:_ CatLibrary.dll +__Namespace:__ [CatLibrary](CatLibrary.md) +__Assembly:__ CatLibrary.dll ```csharp public class CatException : Exception, ISerializable diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Cat`2.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Cat`2.verified.md index 3f3f77f75e8..b5737caf8c2 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Cat`2.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Cat`2.verified.md @@ -1,8 +1,7 @@ # Class Cat -_Namespace:_ [CatLibrary](CatLibrary.md) - -_Assembly:_ CatLibrary.dll +__Namespace:__ [CatLibrary](CatLibrary.md) +__Assembly:__ CatLibrary.dll

    Here's main class of this Demo.

    You can see mostly type of article within this class and you for more detail, please see the remarks.

    diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Complex`2.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Complex`2.verified.md index 3b37ca55edc..f5e5a0aea9e 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Complex`2.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Complex`2.verified.md @@ -1,8 +1,7 @@ # Class Complex -_Namespace:_ [CatLibrary](CatLibrary.md) - -_Assembly:_ CatLibrary.dll +__Namespace:__ [CatLibrary](CatLibrary.md) +__Assembly:__ CatLibrary.dll ```csharp public class Complex diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ColorType.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ColorType.verified.md index 57f87fc22b1..8050c925a28 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ColorType.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ColorType.verified.md @@ -1,8 +1,7 @@ # Enum ColorType -_Namespace:_ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) - -_Assembly:_ CatLibrary.Core.dll +__Namespace:__ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) +__Assembly:__ CatLibrary.Core.dll Enumeration ColorType diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChild.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChild.verified.md index c49c87b003f..a1166ab7432 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChild.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChild.verified.md @@ -1,8 +1,7 @@ # Class ContainersRefTypeChild -_Namespace:_ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) - -_Assembly:_ CatLibrary.Core.dll +__Namespace:__ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) +__Assembly:__ CatLibrary.Core.dll ```csharp public class ContainersRefType.ContainersRefTypeChild diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChildInterface.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChildInterface.verified.md index 1eb8309d5d7..926b4d26cd8 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChildInterface.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeChildInterface.verified.md @@ -1,8 +1,7 @@ # Interface ContainersRefTypeChildInterface -_Namespace:_ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) - -_Assembly:_ CatLibrary.Core.dll +__Namespace:__ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) +__Assembly:__ CatLibrary.Core.dll ```csharp public interface ContainersRefType.ContainersRefTypeChildInterface diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeDelegate.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeDelegate.verified.md index 34214061a07..26aefb8ec4a 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeDelegate.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.ContainersRefTypeDelegate.verified.md @@ -1,8 +1,7 @@ # Delegate ContainersRefTypeDelegate -_Namespace:_ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) - -_Assembly:_ CatLibrary.Core.dll +__Namespace:__ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) +__Assembly:__ CatLibrary.Core.dll Delegate ContainersRefTypeDelegate diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.verified.md index 838755fe83a..d622dc1a6cc 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ContainersRefType.verified.md @@ -1,8 +1,7 @@ # Struct ContainersRefType -_Namespace:_ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) - -_Assembly:_ CatLibrary.Core.dll +__Namespace:__ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) +__Assembly:__ CatLibrary.Core.dll Struct ContainersRefType diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ExplicitLayoutClass.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ExplicitLayoutClass.verified.md index 87b4fec69d2..9e3a27e9998 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ExplicitLayoutClass.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.ExplicitLayoutClass.verified.md @@ -1,8 +1,7 @@ # Class ExplicitLayoutClass -_Namespace:_ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) - -_Assembly:_ CatLibrary.Core.dll +__Namespace:__ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) +__Assembly:__ CatLibrary.Core.dll ```csharp public class ExplicitLayoutClass diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.Issue231.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.Issue231.verified.md index c8a203eacff..117629d0ac4 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.Issue231.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Core.Issue231.verified.md @@ -1,8 +1,7 @@ # Class Issue231 -_Namespace:_ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) - -_Assembly:_ CatLibrary.Core.dll +__Namespace:__ [CatLibrary](CatLibrary.md).[Core](CatLibrary.Core.md) +__Assembly:__ CatLibrary.Core.dll ```csharp public static class Issue231 diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.FakeDelegate`1.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.FakeDelegate`1.verified.md index c462a839900..a9f8c9c5d67 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.FakeDelegate`1.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.FakeDelegate`1.verified.md @@ -1,8 +1,7 @@ # Delegate FakeDelegate -_Namespace:_ [CatLibrary](CatLibrary.md) - -_Assembly:_ CatLibrary.dll +__Namespace:__ [CatLibrary](CatLibrary.md) +__Assembly:__ CatLibrary.dll Fake delegate diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.IAnimal.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.IAnimal.verified.md index 203d8181e00..9b87ba67a8d 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.IAnimal.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.IAnimal.verified.md @@ -1,8 +1,7 @@ # Interface IAnimal -_Namespace:_ [CatLibrary](CatLibrary.md) - -_Assembly:_ CatLibrary.dll +__Namespace:__ [CatLibrary](CatLibrary.md) +__Assembly:__ CatLibrary.dll This is basic interface of all animal. diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICat.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICat.verified.md index 3041cef4419..ffff47398e1 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICat.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICat.verified.md @@ -1,8 +1,7 @@ # Interface ICat -_Namespace:_ [CatLibrary](CatLibrary.md) - -_Assembly:_ CatLibrary.dll +__Namespace:__ [CatLibrary](CatLibrary.md) +__Assembly:__ CatLibrary.dll Cat's interface diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICatExtension.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICatExtension.verified.md index 6956e46160a..493c6b7ff86 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICatExtension.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.ICatExtension.verified.md @@ -1,8 +1,7 @@ # Class ICatExtension -_Namespace:_ [CatLibrary](CatLibrary.md) - -_Assembly:_ CatLibrary.dll +__Namespace:__ [CatLibrary](CatLibrary.md) +__Assembly:__ CatLibrary.dll It's the class that contains ICat interface's extension method.

    This class must be public and static.

    diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefDelegate`3.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefDelegate`3.verified.md index d2b5915d2de..1df0eac671c 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefDelegate`3.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefDelegate`3.verified.md @@ -1,8 +1,7 @@ # Delegate MRefDelegate -_Namespace:_ [CatLibrary](CatLibrary.md) - -_Assembly:_ CatLibrary.dll +__Namespace:__ [CatLibrary](CatLibrary.md) +__Assembly:__ CatLibrary.dll Generic delegate with many constrains. diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefNormalDelegate.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefNormalDelegate.verified.md index a9faad7949c..f69cae3e9db 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefNormalDelegate.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.MRefNormalDelegate.verified.md @@ -1,8 +1,7 @@ # Delegate MRefNormalDelegate -_Namespace:_ [CatLibrary](CatLibrary.md) - -_Assembly:_ CatLibrary.dll +__Namespace:__ [CatLibrary](CatLibrary.md) +__Assembly:__ CatLibrary.dll Delegate in the namespace diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Tom.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Tom.verified.md index 7114da44912..25fef1005d3 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Tom.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.Tom.verified.md @@ -1,8 +1,7 @@ # Class Tom -_Namespace:_ [CatLibrary](CatLibrary.md) - -_Assembly:_ CatLibrary.dll +__Namespace:__ [CatLibrary](CatLibrary.md) +__Assembly:__ CatLibrary.dll Tom class is only inherit from Object. Not any member inside itself. diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.TomFromBaseClass.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.TomFromBaseClass.verified.md index 9d63ef5e715..0401a88d156 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.TomFromBaseClass.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/CatLibrary.TomFromBaseClass.verified.md @@ -1,8 +1,7 @@ # Class TomFromBaseClass -_Namespace:_ [CatLibrary](CatLibrary.md) - -_Assembly:_ CatLibrary.dll +__Namespace:__ [CatLibrary](CatLibrary.md) +__Assembly:__ CatLibrary.dll *TomFromBaseClass* inherits from @ diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/MRef.Demo.Enumeration.ColorType.verified.md b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/MRef.Demo.Enumeration.ColorType.verified.md index c3a21a149cc..5fdff66fb31 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/MRef.Demo.Enumeration.ColorType.verified.md +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedMarkdown/MRef.Demo.Enumeration.ColorType.verified.md @@ -1,8 +1,7 @@ # Enum ColorType -_Namespace:_ [MRef](MRef.md).[Demo](MRef.Demo.md).[Enumeration](MRef.Demo.Enumeration.md) - -_Assembly:_ CatLibrary.dll +__Namespace:__ [MRef](MRef.md).[Demo](MRef.Demo.md).[Enumeration](MRef.Demo.Enumeration.md) +__Assembly:__ CatLibrary.dll Enumeration ColorType From 82c9d254f4e3f7e4878119ac167528292a0f4fdd Mon Sep 17 00:00:00 2001 From: Yufei Huang Date: Thu, 21 Sep 2023 21:37:08 +0800 Subject: [PATCH 9/9] basic TOC generation --- src/Docfx.Dotnet/MarkdownFormatter.cs | 35 ++++++++++++++++++++++-- src/docfx/Properties/launchSettings.json | 8 ++++++ 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/src/Docfx.Dotnet/MarkdownFormatter.cs b/src/Docfx.Dotnet/MarkdownFormatter.cs index c0829f171de..f9a26b3132d 100644 --- a/src/Docfx.Dotnet/MarkdownFormatter.cs +++ b/src/Docfx.Dotnet/MarkdownFormatter.cs @@ -3,6 +3,7 @@ using System.Text; using Docfx.Common; +using Docfx.DataContracts.Common; using Docfx.DataContracts.ManagedReference; using Docfx.Plugins; using Microsoft.CodeAnalysis; @@ -20,6 +21,8 @@ public static void Save(List<(IAssemblySymbol, Compilation)> assemblies, Extract Directory.CreateDirectory(config.OutputFolder); + var toc = new TocViewModel(); + var tocNodeByNamespace = new Dictionary(); var filter = new SymbolFilter(config, options); var extensionMethods = assemblies.SelectMany(assembly => assembly.Item1.FindExtensionMethods()).Where(filter.IncludeApi).ToArray(); var allAssemblies = new HashSet(assemblies.Select(a => a.Item1), SymbolEqualityComparer.Default); @@ -30,9 +33,13 @@ public static void Save(List<(IAssemblySymbol, Compilation)> assemblies, Extract SaveCore(assembly, compilation); } + SortTocItems(toc); + YamlUtility.Serialize(Path.Combine(config.OutputFolder, "toc.yml"), toc, YamlMime.TableOfContent); + void SaveCore(IAssemblySymbol assembly, Compilation compilation) { Logger.LogInfo($"Processing {assembly.Name}"); + VisitNamespace(assembly.GlobalNamespace); void VisitNamespace(INamespaceSymbol symbol) @@ -52,8 +59,20 @@ void VisitNamedType(INamedTypeSymbol symbol) if (!filter.IncludeApi(symbol)) return; - foreach (var subtype in symbol.GetTypeMembers()) - VisitNamedType(subtype); + var ns = symbol.ContainingNamespace.ToString()!; + if (!tocNodeByNamespace.TryGetValue(ns, out var tocNode)) + { + tocNode = new() { Name = ns, Href = $"{VisitorHelper.GetId(symbol.ContainingNamespace)}.md" }; + tocNodeByNamespace.Add(ns, tocNode); + toc.Add(tocNode); + } + + foreach (var type in symbol.GetTypeMembers()) + { + tocNode.Items ??= new(); + tocNode.Items.Add(new() { Name = type.Name, Href = $"{VisitorHelper.GetId(symbol)}.md" }); + VisitNamedType(type); + } Save(symbol); } @@ -68,6 +87,7 @@ void Save(INamedTypeSymbol symbol) case TypeKind.Enum: Enum(); break; case TypeKind.Delegate: Delegate(); break; case TypeKind.Interface or TypeKind.Structure or TypeKind.Class: Class(); break; + default: throw new NotSupportedException($"Unknown symbol type kind {symbol.TypeKind}"); } var filename = Path.Combine(config.OutputFolder, VisitorHelper.GetId(symbol) + ".md"); @@ -516,6 +536,17 @@ string Cref(string commentId) } } + static void SortTocItems(TocViewModel node) + { + node.Sort((a, b) => a.Name.CompareTo(b.Name)); + + foreach (var child in node) + { + if (child.Items is not null) + SortTocItems(child.Items); + } + } + static string Escape(string text) { return text; diff --git a/src/docfx/Properties/launchSettings.json b/src/docfx/Properties/launchSettings.json index 276e86a8c96..10ef212c847 100644 --- a/src/docfx/Properties/launchSettings.json +++ b/src/docfx/Properties/launchSettings.json @@ -18,6 +18,14 @@ "environmentVariables": { } }, + // Run `docfx metadata --outputFormat markdown` command. + "docfx metadata --markdown": { + "commandName": "Project", + "commandLineArgs": "metadata ../../samples/seed/docfx.json --outputFormat markdown", + "workingDirectory": ".", + "environmentVariables": { + } + }, // Run `docfx serve` command and launch browser. "docfx serve": { "commandName": "Project",