Interface IPluginContext
Context provided to plugins during initialization.
public interface IPluginContext
Properties
Configuration
Plugin-specific configuration values.
IReadOnlyDictionary<string, string> Configuration { get; }
Property Value
Kernel
The SK kernel to register functions with.
Kernel Kernel { get; }
Property Value
- Kernel
Methods
GetService<T>()
Gets a service from the host DI container.
T? GetService<T>() where T : class
Returns
- T
Type Parameters
T
Log(PluginLogLevel, string)
Logs a message from the plugin.
void Log(PluginLogLevel level, string message)
Parameters
levelPluginLogLevelmessagestring
OnEvent(string, Func<object?, Task>)
Registers a hook for a gateway event.
void OnEvent(string eventType, Func<object?, Task> handler)