unit AppCentreImport; interface uses InterfaceAppCentre, InterfaceUI; function GetAppCentre: IAppCentre; function GetAppCentreConfig: IAppCentreConfig; function GetAppCentreUIHandler: IUIHandler; const APPCENTRE_BEANNAME: string = 'appCentre'; APPCENTRE_CONFIG: string = 'appCentreConfig'; APPCENTRE_UIHANDLER: string = 'appCentreUIHandler'; implementation uses mybean.tools.beanFactory, LoggerImport, SysUtils; function GetAppCentre: IAppCentre; begin try Result := (TMyBeanFactoryTools.getBean(APPCENTRE_BEANNAME) as IAppCentre); except on E: Exception do Error(E.Message, 'GetAppCentre'); end; end; function GetAppCentreConfig: IAppCentreConfig; begin try Result := (TMyBeanFactoryTools.getBean(APPCENTRE_CONFIG) as IAppCentreConfig); except on E: Exception do Error(E.Message, 'GetAppCentreConfig'); end; end; function GetAppCentreUIHandler: IUIHandler; begin try Result := (TMyBeanFactoryTools.getBean(APPCENTRE_UIHANDLER) as IUIHandler); except on E: Exception do Error(E.Message, 'GetAppCentreUIHandler'); end; end; end.