예제 #1
0
        public IEnumerable <Rebelde> CreateList(StringCollection collection)
        {
            foreach (var item in collection)
            {
                var cadena = _split.Convert(item, ',');
                _listRebeldes.Append(_rebelde = new Rebelde(cadena[0], cadena[1]));
            }

            return(_listRebeldes);
        }
예제 #2
0
 public Rebelde Create(StringCollection collection)
 {
     try
     {
         var cadena = _split.Convert(collection[0], ',');
         _rebelde = new Rebelde(cadena[0], cadena[1]);
         return(_rebelde);
     }
     catch (Exception e)
     {
         throw new RebeldeFactoryException("Error en RebeldeFactory metodo Create ", e);
     }
 }
예제 #3
0
 public Rebelds CreateRebeld(StringCollection collection)
 {
     try
     {
         var cadena = _split.Convert(collection[0], ',');
         _rebelde = new Rebelds(cadena[0], cadena[1]);
     }
     catch (Exception ex)
     {
         throw new FactoryException("No se ha podido crear el objeto de rebelde", ex);
     }
     return(_rebelde);
 }
예제 #4
0
        public IEnumerable <Rebelds> CreateListRebelds(StringCollection collection)
        {
            try
            {
                foreach (var item in collection)
                {
                    var cadena = _split.Convert(item, ',');
                    _listRebelds.Append(Rebeld = new Rebelds(cadena[0], cadena[1]));
                }
            }
            catch (Exception ex)
            {
                throw new FactoryException("No se ha podido crear la lista de rebeldes", ex);
            }

            return(_listRebelds);
        }
예제 #5
0
 public Rebelds CreateRebeld(StringCollection collection)
 {
     try
     {
         var cadena = _split.Convert(collection[0], ',');
         _rebelde = new Rebelds(cadena[0], cadena[1]);
         if (_validationRegisterSpecification.IsSatisfiedBy(_rebelde) == true)
         {
             return(_rebelde);
         }
         else
         {
             throw new FactoryException("No se ha podido crear el objeto ");
         }
     }
     catch (Exception ex)
     {
         throw new FactoryException("No se ha podido crear el objeto de rebelde", ex);
     }
     return(_rebelde);
 }