private void DecorateInternal(Type dependencyType, Type decoratorType, Action <WeaklyTypedDecoratorConfigurator>?configurator = null, string callerFilePath = "", int callerLineNumber = -1) { var context = new WeaklyTypedDecoratorConfigurator(dependencyType, decoratorType, callerFilePath, callerLineNumber, Registrations.CurrentModule); configurator?.Invoke(context); Expression binding = context.ToBinding(); Registrations.AddDecorator(dependencyType, binding); }
private void DecorateInternal(Type dependencyType, Type decoratorType, Action <WeaklyTypedDecoratorConfigurator>?configurator, IConstructorResolver?constructorSelector, string callerFilePath, int callerLineNumber) { var metadata = new BindingMetadata(callerFilePath, callerLineNumber, Registrations.CurrentModule); var context = new WeaklyTypedDecoratorConfigurator(dependencyType, decoratorType, metadata, Settings, constructorSelector); configurator?.Invoke(context); Expression binding = context.ToBinding(); Registrations.AddDecorator(dependencyType, binding); }