[DesignerSupport] Removed code duplication.