Ejemplo n.º 1
0
        protected BeanConfiguration createLinkContainerConfiguration(String eventName)
        {
            BeanConfiguration beanConfiguration = new BeanConfiguration(typeof(PropertyChangedLinkContainerOld), null, ProxyFactory, Props);

            beanConfiguration.PropertyValue("PropertyName", eventName);
            beanConfiguration.PropertyValue("Arguments", new Object[1]);
            return(beanConfiguration);
        }
Ejemplo n.º 2
0
        public IBeanConfiguration RegisterAutowireableBean(Type beanType, Type typeToPublish)
        {
            BeanConfiguration beanConfiguration = new BeanConfiguration(beanType, GenerateBeanName(beanType), proxyFactory, props);

            AddBeanConfiguration(beanConfiguration);
            beanConfiguration.Autowireable(typeToPublish);
            return(beanConfiguration);
        }
Ejemplo n.º 3
0
        public IBeanConfiguration RegisterBean(Type beanType)
        {
            ParamChecker.AssertParamNotNull(beanType, "beanType");

            BeanConfiguration beanConfiguration = new BeanConfiguration(beanType, GenerateBeanName(beanType), proxyFactory, props);

            AddBeanConfiguration(beanConfiguration);
            return(beanConfiguration);
        }
Ejemplo n.º 4
0
        public IBeanConfiguration RegisterBean(String beanName, String parentBeanName)
        {
            ParamChecker.AssertParamNotNull(beanName, "beanName");
            ParamChecker.AssertParamNotNull(parentBeanName, "parentBeanName");
            BeanConfiguration beanConfiguration = new BeanConfiguration(null, beanName, proxyFactory, props);

            beanConfiguration.Parent(parentBeanName);

            AddBeanConfiguration(beanConfiguration);
            return(beanConfiguration);
        }
Ejemplo n.º 5
0
        public IBeanConfiguration createEventLinkConfiguration <D>(String eventProviderBeanName, IEventDelegate <D> eventName, D handlerDelegate)
        {
            ParamChecker.AssertParamNotNull(eventProviderBeanName, "eventProviderBeanName");
            ParamChecker.AssertParamNotNull(eventName, "eventName");
            ParamChecker.AssertParamNotNull(handlerDelegate, "handlerDelegate");

            BeanConfiguration linkContainer = createLinkContainerConfiguration(eventName.EventName);

            linkContainer.PropertyValue("RegistryBeanName", eventProviderBeanName);
            linkContainer.PropertyValue("Listener", handlerDelegate);
            return(linkContainer);
        }
Ejemplo n.º 6
0
        public IBeanConfiguration createEventLinkConfiguration(String eventProviderBeanName, Type eventInterface, Delegate handlerDelegate)
        {
            ParamChecker.AssertParamNotNull(eventProviderBeanName, "eventProviderBeanName");
            ParamChecker.AssertParamNotNull(eventInterface, "eventInterface");
            ParamChecker.AssertParamNotNull(handlerDelegate, "handlerDelegate");

            BeanConfiguration linkContainer = createLinkContainerConfiguration(eventInterface, (String)null);

            linkContainer.PropertyValue("RegistryBeanName", eventProviderBeanName);
            linkContainer.PropertyValue("Listener", handlerDelegate);
            return(linkContainer);
        }
Ejemplo n.º 7
0
        public IBeanConfiguration createLinkConfiguration(String listenerBeanName, Type autowiredRegistryClass, Object[] arguments)
        {
            ParamChecker.AssertParamNotNull(listenerBeanName, "listenerBeanName");
            ParamChecker.AssertParamNotNull(autowiredRegistryClass, "autowiredRegistryClass");
            ParamChecker.AssertParamNotNull(arguments, "arguments");

            BeanConfiguration linkContainer = createLinkContainerConfiguration(autowiredRegistryClass, arguments);

            linkContainer.PropertyValue("RegistryBeanAutowiredType", autowiredRegistryClass);
            linkContainer.PropertyValue("ListenerBeanName", listenerBeanName);
            return(linkContainer);
        }
Ejemplo n.º 8
0
        protected BeanConfiguration createLinkContainerConfiguration(Type registryType, Object[] arguments)
        {
            Object[]     linkArguments;
            MethodInfo[] methods = ExtendableRegistry.GetAddRemoveMethods(registryType, arguments, out linkArguments);

            BeanConfiguration beanConfiguration = new BeanConfiguration(typeof(LinkContainerOld), null, ProxyFactory, Props);

            beanConfiguration.PropertyValue("AddMethod", methods[0]);
            beanConfiguration.PropertyValue("RemoveMethod", methods[1]);
            beanConfiguration.PropertyValue("Arguments", linkArguments);
            return(beanConfiguration);
        }
Ejemplo n.º 9
0
        public IBeanConfiguration createEventLinkConfiguration(String eventProviderBeanName, Type eventInterface, String listenerBeanName, String methodName)
        {
            ParamChecker.AssertParamNotNull(eventProviderBeanName, "eventProviderBeanName");
            ParamChecker.AssertParamNotNull(eventInterface, "eventInterface");
            ParamChecker.AssertParamNotNull(listenerBeanName, "listenerBeanName");
            ParamChecker.AssertParamNotNull(methodName, "methodName");

            BeanConfiguration linkContainer = createLinkContainerConfiguration(eventInterface, methodName);

            linkContainer.PropertyValue("RegistryBeanName", eventProviderBeanName);
            linkContainer.PropertyValue("ListenerBeanName", listenerBeanName);
            return(linkContainer);
        }
Ejemplo n.º 10
0
        protected BeanConfiguration createLinkContainerConfiguration(Type registryType, String methodName)
        {
            Object[]     linkArguments;
            MethodInfo[] methods = ExtendableRegistry.GetAddRemoveMethods(registryType, null, out linkArguments);

            BeanConfiguration beanConfiguration = new BeanConfiguration(typeof(LinkContainerOld), null, ProxyFactory, Props);

            beanConfiguration.PropertyValue("AddMethod", methods[0]);
            beanConfiguration.PropertyValue("RemoveMethod", methods[1]);
            beanConfiguration.PropertyValue("Arguments", linkArguments);
            if (methodName != null)
            {
                beanConfiguration.PropertyValue("Listener", new LateDelegate(methods[0].GetParameters()[0].ParameterType, methodName));
            }
            return(beanConfiguration);
        }