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); }
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); }
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); }