Exemple #1
0
        public static T Load <T>(string file, [NotNull] params Type[] types)
            where T : class, new()
        {
            var ser = new SerializerXml(file);
            var res = ser.DeserializeXmlFile <T>(types);

            return(res);
        }
Exemple #2
0
        /// <summary>
        /// Считывание объекта из файла
        /// </summary>
        /// <typeparam name="T">Тип считываемого объекта></typeparam>
        /// <param name="file">Файл xml</param>
        /// <returns>Объект T или null</returns>
        public static T Load <T>(string file)
            where T : class, new()
        {
            var ser = new SerializerXml(file);
            var res = ser.DeserializeXmlFile <T>();

            return(res);
        }