shall not, during their terms of office or during the time they are so employed, in any court of this State, accept an appointment to defend, agree to defend or undertake the defense of any person charged with the violation of any ordinance or any law of this State.
NRS 7.105