/// <summary> /// Register a Func to run against any object of this PluginType immediately after it is created, /// but before the new object is passed back to the caller. Unlike OnCreationForAll(), /// DecorateAllWith() gives the the ability to return a different object. Use this method for runtime AOP /// scenarios or to return a decorator. /// </summary> /// <param name="description">Descriptive text for diagnostics</param> /// <param name="handler">Function that will create a decorator for the plugin type</param> /// <param name="filter"></param> public CreatePluginFamilyExpression <TPluginType> DecorateAllWith(string description, Func <IContext, TPluginType, TPluginType> handler, Func <Instance, bool> filter = null) { return(InterceptWith(InterceptorFactory.ForFunc(description, handler), filter)); }