예제 #1
0
        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;
        }
예제 #2
0
        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);
        }
예제 #3
0
 public Monedas(ICambioMoneda cambioMoneda)
 {
     _cambioMoneda = cambioMoneda;
 }