public override IComponentAdapter RegisterComponentImplementation(Object componentKey, Type componentImplementation) { if (componentKey is Type) { Type clazz = (Type)componentKey; if (clazz.IsInterface) { IComponentAdapter caDelegate = caf.CreateComponentAdapter(componentKey, componentImplementation, null); return (DelegateContainer.RegisterComponent(new ImplementationHidingComponentAdapter(caDelegate, true))); } } return(DelegateContainer.RegisterComponentImplementation(componentKey, componentImplementation)); }
public override IComponentAdapter RegisterComponentImplementation(Object componentKey, Type componentImplementation, IParameter[] parameters) { if (componentKey is Type) { Type clazz = (Type)componentKey; if (clazz.IsInterface) { IComponentAdapter caDelegate = caf.CreateComponentAdapter(componentKey, componentImplementation, parameters); ImplementationHidingComponentAdapter ihDelegate = new ImplementationHidingComponentAdapter(caDelegate, true); return(DelegateContainer.RegisterComponent(new CachingComponentAdapter(ihDelegate))); } } return(DelegateContainer.RegisterComponentImplementation(componentKey, componentImplementation, parameters)); }