-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
223 additions
and
290 deletions.
There are no files selected for viewing
180 changes: 64 additions & 116 deletions
180
src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...ries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonObjectInfoValues.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
namespace System.Text.Json.Serialization.Metadata | ||
{ | ||
/// <summary> | ||
/// Provides serialization metadata about an object type with constructors, properties, and fields. | ||
/// </summary> | ||
/// <typeparam name="T">The object type to serialize or deserialize.</typeparam> | ||
public sealed class JsonObjectInfoValues<T> | ||
{ | ||
/// <summary> | ||
/// Provides a mechanism to create an instance of the class or struct when deserializing, using a parameterless constructor. | ||
/// </summary> | ||
public Func<T>? ObjectCreator { get; init; } | ||
|
||
/// <summary> | ||
/// Provides a mechanism to create an instance of the class or struct when deserializing, using a parameterized constructor. | ||
/// </summary> | ||
public Func<object[], T>? ObjectWithParameterizedConstructorCreator { get; init; } | ||
|
||
/// <summary> | ||
/// Provides a mechanism to initialize metadata for properties and fields of the class or struct. | ||
/// </summary> | ||
public Func<JsonSerializerContext, JsonPropertyInfo[]>? PropertyMetadataInitializer { get; init; } | ||
|
||
/// <summary> | ||
/// Provides a mechanism to initialize metadata for a parameterized constructor of the class or struct to be used when deserializing. | ||
/// </summary> | ||
public Func<JsonParameterInfoValues[]>? ConstructorParameterMetadataInitializer { get; init; } | ||
|
||
/// <summary> | ||
/// Specifies how number properties and fields should be processed when serializing and deserializing. | ||
/// </summary> | ||
public JsonNumberHandling NumberHandling { get; init; } | ||
|
||
/// <summary> | ||
/// Provides a serialization implementation for instances of the class or struct which assumes options specified by <see cref="JsonSourceGenerationOptionsAttribute"/>. | ||
/// </summary> | ||
public Action<Utf8JsonWriter, T>? SerializeHandler { get; init; } | ||
} | ||
} |
Oops, something went wrong.