Пример #1
0
            public List <T> Deserialize <T>() where T : new()
            {
                var recordType = typeof(T);
                var memberDic  = CsvUtility.ExtractMembers(recordType);
                var members    = ReadHeader(memberDic);

                // 本体解釈
                return(ReadRecords <T>(members));
            }
Пример #2
0
        public static List <T> FromCsv <T>(string csv) where T : new()
        {
            var instance = new CsvUtility();

            return(instance.Deserialize <T>(csv));
        }
Пример #3
0
        public static string ToCsv <T>(IEnumerable <T> items, IEnumerable <string> columnOrder = null)
        {
            var instance = new CsvUtility();

            return(instance.Serialize(items, columnOrder));
        }