Ejemplo n.º 1
0
        public LinkConfiguration <D> CreateLinkConfiguration <D>(D listener)
        {
            LinkConfiguration <D> linkConfiguration = new LinkConfiguration <D>(typeof(LinkContainer), ProxyFactory, Props);

            linkConfiguration.PropertyValue(LinkContainer.PROPERTY_LISTENER, listener);
            return(linkConfiguration);
        }
Ejemplo n.º 2
0
        public LinkConfiguration <Object> CreateLinkConfiguration(IBeanConfiguration listenerBean, String methodName)
        {
            LinkConfiguration <Object> linkConfiguration = new LinkConfiguration <Object>(typeof(LinkContainer), ProxyFactory, Props);

            linkConfiguration.PropertyValue(LinkContainer.PROPERTY_LISTENER_BEAN, listenerBean);
            if (methodName != null)
            {
                linkConfiguration.PropertyValue(LinkContainer.PROPERTY_LISTENER_METHOD_NAME, methodName);
            }
            return(linkConfiguration);
        }
Ejemplo n.º 3
0
        public LinkConfiguration <Object> CreateLinkConfiguration(Object listener, String methodName)
        {
            if (listener is String)
            {
                return(CreateLinkConfiguration((String)listener, methodName));
            }
            else if (listener is IBeanConfiguration)
            {
                return(CreateLinkConfiguration((IBeanConfiguration)listener, methodName));
            }
            // else if (listener is Delegate)
            // {
            // throw new Exception("Illegal state: Delegate can not have an additional methodName");
            // }
            LinkConfiguration <Object> linkConfiguration = new LinkConfiguration <Object>(typeof(LinkContainer), ProxyFactory, Props);

            linkConfiguration.PropertyValue(LinkContainer.PROPERTY_LISTENER, listener);
            if (methodName != null)
            {
                linkConfiguration.PropertyValue(LinkContainer.PROPERTY_LISTENER_METHOD_NAME, methodName);
            }
            return(linkConfiguration);
        }