-
Notifications
You must be signed in to change notification settings - Fork 559
Closed
Labels
documentationThe issue or pull request is about documentationThe issue or pull request is about documentationdotnetAn issue or pull request related to .NET (6)An issue or pull request related to .NET (6)generatorIssues affecting the generatorIssues affecting the generator
Milestone
Description
Ref: #14372, step 4
The idea is to add support in the generator for writing XML documentation based on an attribute in the api definition:
This would be the attribute:
public class DocumentationAttribute : Attribute {
public DocumentationAttribute ()
{
}
public DocumentationAttribute (string xml)
{
this.Xml = xml;
}
public string Xml { get; set; }
public string Include { get; set; }
public string XmlPath { get; set; }
}and this would be how to use it:
[Documentation (
@"
/// <summary>
/// Documentation for UIView
/// </summary>
")
]
public interface UIView {
}
[Documentation (Include = "/path/to/file.xml", XmlPath = "Type@[FullName='UIKit.UIView']/Docs/*")]
public interface UIView {
}MAUI example with include path: https://github.com/dotnet/maui/blob/6377c3259387913f3acc7f7858028f7c97a0480b/src/Controls/src/Core/Application.cs#L17
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationThe issue or pull request is about documentationThe issue or pull request is about documentationdotnetAn issue or pull request related to .NET (6)An issue or pull request related to .NET (6)generatorIssues affecting the generatorIssues affecting the generator