示例#1
0
文件: Program.cs 项目: berczeck/.Net
        private static void Main(string[] args)
        {
            var listCobro = new Dictionary<Type, ICobroRegistro>
            {
                {typeof (PersonaNatural), new CobroRegistroPersonaNatural()},
                {typeof (PersonaJuridica), new CobroRegistroPersonaJuridica()}
            };

            var flujo = new FlujoCobro(new PersonaJuridica()) {ListaCobros = listCobro};

            flujo.RelizarCobro();
        }
示例#2
0
        private static void Main(string[] args)
        {
            var listCobro = new Dictionary <Type, ICobroRegistro>
            {
                { typeof(PersonaNatural), new CobroRegistroPersonaNatural() },
                { typeof(PersonaJuridica), new CobroRegistroPersonaJuridica() }
            };

            var flujo = new FlujoCobro(new PersonaJuridica())
            {
                ListaCobros = listCobro
            };

            flujo.RelizarCobro();
        }