Files
microsoft--semantic-kernel/dotnet/samples/Demos/HomeAutomation/Plugins/MyAlarmPlugin.cs
T
wehub-resource-sync b957a53def
CodeQL / Analyze (csharp) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:21:23 +08:00

21 lines
594 B
C#

// Copyright (c) Microsoft. All rights reserved.
using System.ComponentModel;
using Microsoft.SemanticKernel;
namespace HomeAutomation.Plugins;
/// <summary>
/// Simple plugin to illustrate creating plugins which have dependencies
/// that can be resolved through dependency injection.
/// </summary>
public class MyAlarmPlugin(MyTimePlugin timePlugin)
{
[KernelFunction, Description("Sets an alarm at the provided time")]
public void SetAlarm(string time)
{
// Code to actually set the alarm using the time plugin would be placed here
_ = timePlugin;
}
}