public void Intercept(IInvocation invocation) { using (var scope = scopeFactory.BeginLifetimeScope()) { var resolveParameters = invocation.Method.GetParameters().Where(p => p.GetCustomAttribute <ResolvedAttribute>() != null); foreach (var p in resolveParameters) { invocation.SetArgumentValue(p.Position, scope.Resolve(p.ParameterType)); } invocation.Proceed(); } }