-
Notifications
You must be signed in to change notification settings - Fork 748
Expand file tree
/
Copy pathPackageMetadataJsonContext.cs
More file actions
27 lines (25 loc) · 1.04 KB
/
PackageMetadataJsonContext.cs
File metadata and controls
27 lines (25 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Text.Json.Serialization;
using NuGet.Protocol.Model;
namespace NuGet.Protocol.Converters
{
#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant
[JsonSourceGenerationOptions(
PropertyNameCaseInsensitive = true,
GenerationMode = JsonSourceGenerationMode.Metadata,
Converters = new[]
{
typeof(NuGetVersionStjConverter),
typeof(VersionInfoStjConverter),
typeof(PackageDependencyGroupStjConverter),
typeof(PackageDependencyStjConverter),
typeof(VersionRangeStjConverter)
})]
#pragma warning restore CS3016 // Arrays as attribute arguments is not CLS-compliant
[JsonSerializable(typeof(RegistrationIndex))]
[JsonSerializable(typeof(RegistrationPage))]
internal partial class PackageMetadataJsonContext : JsonSerializerContext
{
}
}