public CasaCambioContext(string tipo) { string fullName = string.Concat("Patrones.Strategy.TiposCambio.", tipo); Type classtype = Type.GetType(fullName); ICambioMoneda clase = (ICambioMoneda)Activator.CreateInstance(classtype); Strategy = clase; }
public ICambioMoneda Test(string nombreClase) { string fullName = string.Concat("Patrones.Strategy.", nombreClase); Type classtype = Type.GetType(fullName); ICambioMoneda clase = (ICambioMoneda)Activator.CreateInstance(classtype); return(clase); }
public Monedas(ICambioMoneda cambioMoneda) { _cambioMoneda = cambioMoneda; }