private static T ToObject <T>(ZipArchiveEntry entry)
 {
     if (entry.Name.EndsWith(".yaml", StringComparison.OrdinalIgnoreCase))
     {
         using (var stream = entry.Open())
             using (var textReader = new StreamReader(stream))
             {
                 var obj = YamlPocoSerializer.Read <T>(textReader);
                 return(obj);
             }
     }
     else
     {
         var je = entry.ToJson();
         return(je.ToObject <T>());
     }
 }
예제 #2
0
        private static T ToObject <T>(ZipArchiveEntry entry)
        {
            var je = entry.ToJson();

            return(je.ToObject <T>());
        }