Files
microsoft--semantic-kernel/dotnet/samples/Demos/ProcessWithCloudEvents/ProcessWithCloudEvents.Processes/Steps/PublishDocumentationStep.cs
T
wehub-resource-sync b957a53def
CodeQL / Analyze (csharp) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
chore: import upstream snapshot with attribution
2026-07-13 13:21:23 +08:00

30 lines
1.0 KiB
C#

// Copyright (c) Microsoft. All rights reserved.
using Microsoft.SemanticKernel;
using ProcessWithCloudEvents.Processes.Models;
namespace ProcessWithCloudEvents.Processes.Steps;
/// <summary>
/// Step that publishes the generated documentation
/// </summary>
public class PublishDocumentationStep : KernelProcessStep
{
/// <summary>
/// Function that publishes the generated documentation
/// </summary>
/// <param name="document">document to be published</param>
/// <param name="userApproval">approval from the user</param>
/// <returns><see cref="DocumentInfo"/></returns>
[KernelFunction]
public DocumentInfo OnPublishDocumentation(DocumentInfo document, bool userApproval)
{
if (userApproval)
{
// For example purposes we just write the generated docs to the console
Console.WriteLine($"[{nameof(PublishDocumentationStep)}]:\tPublishing product documentation approved by user: \n{document.Title}\n{document.Content}");
}
return document;
}
}