[bgen] Generate xml documentation for generated default constructors. (#20525)

This was mostly copied from the existing API documentation.

Partial fix for https://github.com/xamarin/xamarin-macios/issues/20270.
This commit is contained in:
Rolf Bjarne Kvinge 2024-04-29 12:05:12 +02:00 коммит произвёл GitHub
Родитель b540a0a914
Коммит 7292983fbf
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
10 изменённых файлов: 116 добавлений и 2157 удалений

Просмотреть файл

@ -5641,6 +5641,9 @@ public partial class Generator : IMemberGatherer {
var is32BitNotSupported = Is64BitiOSOnly (type);
if (external) {
if (!disable_default_ctor) {
if (BindingTouch.SupportsXmlDocumentation) {
sw.WriteLine ($"\t\t/// <summary>Creates a new <see cref=\"{class_name.Replace ('<', '{').Replace ('>', '}')}\" /> with default values.</summary>");
}
GeneratedCode (sw, 2);
if (AttributeManager.HasAttribute<DesignatedDefaultCtorAttribute> (type))
sw.WriteLine ("\n\n[DesignatedInitializer]");
@ -5665,6 +5668,9 @@ public partial class Generator : IMemberGatherer {
}
} else {
if (!disable_default_ctor) {
if (BindingTouch.SupportsXmlDocumentation) {
sw.WriteLine ($"\t\t/// <summary>Creates a new <see cref=\"{class_name.Replace ('<', '{').Replace ('>', '}')}\" /> with default values.</summary>");
}
GeneratedCode (sw, 2);
if (AttributeManager.HasAttribute<DesignatedDefaultCtorAttribute> (type))
sw.WriteLine ("\t\t[DesignatedInitializer]");

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -87,6 +87,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.Notification1.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.Notification1" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.Notification1.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
@ -244,6 +247,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.T1.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.T1" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.T1.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
@ -301,6 +307,11 @@
</para>
</remarks>
</member>
<member name="M:XmlDocumentation.T1.#ctor(System.String)">
<summary>
Summary for T2.#ctor(String)
</summary>
</member>
<member name="M:XmlDocumentation.T1.Method">
<summary>
Summary for T1.Method
@ -340,6 +351,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.TG1`2.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.TG1`2" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.TG1`2.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>

Просмотреть файл

@ -87,6 +87,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.Notification1.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.Notification1" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.Notification1.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
@ -244,6 +247,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.T1.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.T1" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.T1.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
@ -301,6 +307,11 @@
</para>
</remarks>
</member>
<member name="M:XmlDocumentation.T1.#ctor(System.String)">
<summary>
Summary for T2.#ctor(String)
</summary>
</member>
<member name="M:XmlDocumentation.T1.Method">
<summary>
Summary for T1.Method
@ -340,6 +351,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.TG1`2.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.TG1`2" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.TG1`2.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
@ -421,6 +435,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.TypeWithApparance.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.TypeWithApparance" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.TypeWithApparance.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>

Просмотреть файл

@ -87,6 +87,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.Notification1.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.Notification1" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.Notification1.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
@ -244,6 +247,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.T1.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.T1" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.T1.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
@ -301,6 +307,11 @@
</para>
</remarks>
</member>
<member name="M:XmlDocumentation.T1.#ctor(System.String)">
<summary>
Summary for T2.#ctor(String)
</summary>
</member>
<member name="M:XmlDocumentation.T1.Method">
<summary>
Summary for T1.Method
@ -340,6 +351,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.TG1`2.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.TG1`2" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.TG1`2.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
@ -421,6 +435,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.TypeWithApparance.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.TypeWithApparance" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.TypeWithApparance.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>

Просмотреть файл

@ -87,6 +87,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.Notification1.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.Notification1" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.Notification1.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
@ -244,6 +247,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.T1.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.T1" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.T1.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
@ -301,6 +307,11 @@
</para>
</remarks>
</member>
<member name="M:XmlDocumentation.T1.#ctor(System.String)">
<summary>
Summary for T2.#ctor(String)
</summary>
</member>
<member name="M:XmlDocumentation.T1.Method">
<summary>
Summary for T1.Method
@ -340,6 +351,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.TG1`2.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.TG1`2" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.TG1`2.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>

Просмотреть файл

@ -87,6 +87,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.Notification1.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.Notification1" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.Notification1.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
@ -244,6 +247,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.T1.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.T1" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.T1.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
@ -301,6 +307,11 @@
</para>
</remarks>
</member>
<member name="M:XmlDocumentation.T1.#ctor(System.String)">
<summary>
Summary for T2.#ctor(String)
</summary>
</member>
<member name="M:XmlDocumentation.T1.Method">
<summary>
Summary for T1.Method
@ -340,6 +351,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.TG1`2.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.TG1`2" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.TG1`2.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>

Просмотреть файл

@ -87,6 +87,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.Notification1.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.Notification1" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.Notification1.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
@ -244,6 +247,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.T1.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.T1" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.T1.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
@ -301,6 +307,11 @@
</para>
</remarks>
</member>
<member name="M:XmlDocumentation.T1.#ctor(System.String)">
<summary>
Summary for T2.#ctor(String)
</summary>
</member>
<member name="M:XmlDocumentation.T1.Method">
<summary>
Summary for T1.Method
@ -340,6 +351,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.TG1`2.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.TG1`2" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.TG1`2.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>

Просмотреть файл

@ -87,6 +87,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.Notification1.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.Notification1" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.Notification1.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
@ -244,6 +247,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.T1.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.T1" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.T1.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
@ -301,6 +307,11 @@
</para>
</remarks>
</member>
<member name="M:XmlDocumentation.T1.#ctor(System.String)">
<summary>
Summary for T2.#ctor(String)
</summary>
</member>
<member name="M:XmlDocumentation.T1.Method">
<summary>
Summary for T1.Method
@ -340,6 +351,9 @@
It is similar to calling the managed <see cref="M:ObjCRuntime.Class.GetHandle(System.String)" /> or the native <see href="https://developer.apple.com/documentation/objectivec/1418952-objc_getclass">objc_getClass</see> method with the type name.
</remarks>
</member>
<member name="M:XmlDocumentation.TG1`2.#ctor">
<summary>Creates a new <see cref="T:XmlDocumentation.TG1`2" /> with default values.</summary>
</member>
<member name="M:XmlDocumentation.TG1`2.#ctor(Foundation.NSObjectFlag)">
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>

Просмотреть файл

@ -10,6 +10,12 @@ namespace XmlDocumentation {
/// </summary>
[BaseType (typeof (NSObject))]
interface T1 : P1 {
/// <summary>
/// Summary for T2.#ctor(String)
/// </summary>
[Export ("initWithString:")]
IntPtr Constructor (string p);
/// <summary>
/// Summary for T1.Method
/// </summary>