protected override void LoadObjectDefinitions(DefaultListableObjectFactory objectFactory) { //wrap the objectFactory with our own proxy so that we keep track of the objects ids defined in the Spring.NET context callbacks.Add(new BeanohObjectFactoryMethodInterceptor(objectFactory)); ProxyGenerator generator = new ProxyGenerator(); DefaultListableObjectFactory wrapper = (DefaultListableObjectFactory)generator.CreateClassProxy(objectFactory.GetType(), callbacks.ToArray()); //delegate to our proxy base.LoadObjectDefinitions(wrapper); }
public BeanohObjectFactoryMethodInterceptor(DefaultListableObjectFactory proxiedFactory) { this.proxiedFactory = proxiedFactory; this.proxiedType = proxiedFactory.GetType(); this.objectDefinitionMap = new Dictionary<string, IList<IObjectDefinition>>(); }