Botbuilder-samples: Unclear whether samples should contain documentation comments or not

Created on 18 Apr 2019  路  4Comments  路  Source: microsoft/BotBuilder-Samples

The samples are currently inconsistent with regard to whether they contain documentation comments or just regular comments. An example of a sample with documentation comments is EchoWithCounter:

c# /// <summary> /// Represents a bot that processes incoming activities. /// For each user interaction, an instance of this class is created and the OnTurnAsync method is called. /// This is a Transient lifetime service. Transient lifetime services are created /// each time they're requested. Objects that are expensive to construct, or have a lifetime /// beyond a single turn, should be carefully managed. /// For example, the <see cref="MemoryStorage"/> object and associated /// <see cref="IStatePropertyAccessor{T}"/> object are created with a singleton lifetime. /// </summary> /// <seealso cref="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection?view=aspnetcore-2.1"/> public class EchoWithCounterBot : IBot

I think documentation comments are important even when there's no intention to generate documentation files because they still help with Intellisense. But in any case, a decision should be reached for the sake of consistency.

[bug]

4.4 bug

Most helpful comment

We are no longer adding /// comments to C# samples

All 4 comments

I just had a look in the samples-work-in-progress branch and it looks like it's much harder to find an example of documentation comments than I thought. They can be seen in MultiLingualBot, at least.

Actually, documentation comments seem to be pretty common in Node. Look at core-bot:

    /**
     * The run method handles the incoming activity (in the form of a TurnContext) and passes it through the dialog system.
     * If no dialog is active, it will start the default dialog.
     * @param {*} turnContext
     * @param {*} accessor
     */
    async run(turnContext, accessor) {

We are no longer adding /// comments to C# samples

I've updated any sample that used /// comments. these changes are staged in the samples WIP branch.

Was this page helpful?
0 / 5 - 0 ratings