TMDM-7806: use IExAdapter structure to refactor the code.