コード例 #1
0
        public static byte[] SerializeToUtf8Json(this ChecksumFile checksumFile)
        {
            var options = new JsonSerializerOptions
            {
                WriteIndented = true,
            };

            options.Converters.Add(new JsonStringEnumConverter());
            return(JsonSerializer.SerializeToUtf8Bytes(checksumFile, options));
        }
コード例 #2
0
ファイル: Comparer.cs プロジェクト: dreikin/HashTools
 // CAUTION: This doesn't check for duplicate roots inside a list.
 public static ComparisonFile Compare(ChecksumFile left, ChecksumFile right)
 {
     return(new ComparisonFile(Compare(left.ChecksumCollections, right.ChecksumCollections)));
 }