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>()); } }
private static T ToObject <T>(ZipArchiveEntry entry) { var je = entry.ToJson(); return(je.ToObject <T>()); }