microsoft/CsWin32

Inherited COM methods do not have documentation comments

Chiusa

#1391 aperta il 23 mar 2025

 (0 commenti) (0 reazioni) (0 assegnatari)C# (123 fork)github user discovery
buggood first issue

Metriche repository

Star
 (2515 stelle)
Metriche merge PR
 (Merge medio 16g 2h) (19 PR mergiate in 30 g)

Descrizione

Create the following NativeMethods.txt:

IShellDispatch2

Then open the generated Windows.Win32.IShellDispatch2.g.cs. Note that the methods defined originally in IShellDispatch2 have documentation:

/// <summary>IShellDispatch2.IsRestricted method - Retrieves a group's restriction setting from the registry.</summary>
/// <returns></returns>
/// <remarks>
/// <para>This method is implemented and accessed through the [**Shell.IsRestricted**](./shell-isrestricted.md) method. **IsRestricted** first looks for a subkey name that matches *sGroup* under the following key. </para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/shell/ishelldispatch2-isrestricted#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
int IsRestricted(winmdroot.Foundation.BSTR Group, winmdroot.Foundation.BSTR Restriction);

But the methods which are defined originally in IShellDispatch and redefined in IShellDispatch2 have no documentation:

new void FileRun();

Open the generated Windows.Win32.IShellDispatch.g.cs, confirming that the original FileRun has documentation:

/// <summary>Displays the Run dialog to the user.</summary>
/// <returns>This method has no parameters.</returns>
/// <remarks>This method is implemented and accessed through the [**Shell.FileRun**](shell-filerun.md) method.</remarks>
void FileRun();

The documentation should also be generated on the re-defined methods in derived interfaces.

Context

  • CsWin32 version: 0.3.183
  • Target Framework: net9.0

Guida contributor