A function-based plugin that receives the target instance and an Enhance utility.
Plugins are used to apply side effects or configuration to an object instance
during middleware setup. The plugin receives the instance directly and can
enhance its methods, set properties, or perform any initialization logic.
Use this when a simple function is sufficient for the plugin logic.
For more complex plugins that carry state or configuration, use
IPluginObject instead.
Type Parameters
TInstance
The type of the target instance being configured
Param: instance
The target instance to configure
Param: enhance
The Enhance utility for wrapping methods with middleware
A function-based plugin that receives the target instance and an Enhance utility.
Plugins are used to apply side effects or configuration to an object instance during middleware setup. The plugin receives the instance directly and can enhance its methods, set properties, or perform any initialization logic.
Use this when a simple function is sufficient for the plugin logic. For more complex plugins that carry state or configuration, use IPluginObject instead.