Ejemplo n.º 1
0
        public T DeserialiserFactory <T>(int personId)
        {
            string source;

            // En binary
            source = HttpContext.Current.Server.MapPath(string.Format(this.CheminDat, personId));
            // En soap
            //source = HttpContext.Current.Server.MapPath(string.Format(this.CheminSoap, personId));

            var factory = FabriqueSerialiseur.GetSerialiseur(source);

            return(factory.Deserialiser <T>(source));
        }
Ejemplo n.º 2
0
        public void SerialiserFactory <T>(int personId, T objet)
        {
            string destination;

            // En binary
            destination = HttpContext.Current.Server.MapPath(string.Format(this.CheminDat, personId));
            // En soap
            //destination = HttpContext.Current.Server.MapPath(string.Format(this.CheminSoap, personId));

            var factory = FabriqueSerialiseur.GetSerialiseur(destination);

            factory.Serialiser <T>(objet, destination);
        }