public DecoratorHelper(CreatePluginFamilyExpression <TTarget> target) { ContextEnrichmentHandler <TTarget> callback = (ctx, t) => t; _decorateCommand = e => { callback = e; }; target.EnrichAllWith((ctx, t) => callback(ctx, t)); }
public StructureMapMapping <TInterface, TImplementation> DecorateWith <TDecorator>(Func <IServiceLocator, TInterface, TDecorator> function) where TDecorator : TInterface { _for.EnrichAllWith((original) => function(ServiceLocator.Current, original)); return(this); }