Skip to content

Commit 2ffaa1e

Browse files
committed
test: Fixed.
1 parent 6b36c90 commit 2ffaa1e

File tree

42 files changed

+3179
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+3179
-1
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
//HintName: IVariousTypesTools.Boolean.g.cs
2+
// <auto-generated/>
3+
4+
#nullable enable annotations
5+
#nullable disable warnings
6+
7+
// Suppress warnings about [Obsolete] member usage in generated code.
8+
#pragma warning disable CS0612, CS0618
9+
10+
namespace CSharpToJsonSchema.IntegrationTests
11+
{
12+
public partial class VariousTypesToolsExtensionsJsonSerializerContext
13+
{
14+
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<bool>? _Boolean;
15+
16+
/// <summary>
17+
/// Defines the source generated JSON serialization contract metadata for a given type.
18+
/// </summary>
19+
#nullable disable annotations // Marking the property type as nullable-oblivious.
20+
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<bool> Boolean
21+
#nullable enable annotations
22+
{
23+
get => _Boolean ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<bool>)Options.GetTypeInfo(typeof(bool));
24+
}
25+
26+
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<bool> Create_Boolean(global::System.Text.Json.JsonSerializerOptions options)
27+
{
28+
if (!TryGetTypeInfoForRuntimeCustomConverter<bool>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<bool> jsonTypeInfo))
29+
{
30+
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateValueInfo<bool>(options, global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.BooleanConverter);
31+
}
32+
33+
jsonTypeInfo.OriginatingResolver = this;
34+
return jsonTypeInfo;
35+
}
36+
}
37+
}

src/tests/CSharpToJsonSchema.SnapshotTests/Snapshots/ToolTests.VariousTypes#IVariousTypesTools.Calls.generated.verified.cs

Lines changed: 383 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
//HintName: IVariousTypesTools.DateOnly.g.cs
2+
// <auto-generated/>
3+
4+
#nullable enable annotations
5+
#nullable disable warnings
6+
7+
// Suppress warnings about [Obsolete] member usage in generated code.
8+
#pragma warning disable CS0612, CS0618
9+
10+
namespace CSharpToJsonSchema.IntegrationTests
11+
{
12+
public partial class VariousTypesToolsExtensionsJsonSerializerContext
13+
{
14+
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.DateOnly>? _DateOnly;
15+
16+
/// <summary>
17+
/// Defines the source generated JSON serialization contract metadata for a given type.
18+
/// </summary>
19+
#nullable disable annotations // Marking the property type as nullable-oblivious.
20+
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.DateOnly> DateOnly
21+
#nullable enable annotations
22+
{
23+
get => _DateOnly ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.DateOnly>)Options.GetTypeInfo(typeof(global::System.DateOnly));
24+
}
25+
26+
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.DateOnly> Create_DateOnly(global::System.Text.Json.JsonSerializerOptions options)
27+
{
28+
if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.DateOnly>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.DateOnly> jsonTypeInfo))
29+
{
30+
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateValueInfo<global::System.DateOnly>(options, global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.DateOnlyConverter);
31+
}
32+
33+
jsonTypeInfo.OriginatingResolver = this;
34+
return jsonTypeInfo;
35+
}
36+
}
37+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
//HintName: IVariousTypesTools.DateTime.g.cs
2+
// <auto-generated/>
3+
4+
#nullable enable annotations
5+
#nullable disable warnings
6+
7+
// Suppress warnings about [Obsolete] member usage in generated code.
8+
#pragma warning disable CS0612, CS0618
9+
10+
namespace CSharpToJsonSchema.IntegrationTests
11+
{
12+
public partial class VariousTypesToolsExtensionsJsonSerializerContext
13+
{
14+
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.DateTime>? _DateTime;
15+
16+
/// <summary>
17+
/// Defines the source generated JSON serialization contract metadata for a given type.
18+
/// </summary>
19+
#nullable disable annotations // Marking the property type as nullable-oblivious.
20+
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.DateTime> DateTime
21+
#nullable enable annotations
22+
{
23+
get => _DateTime ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.DateTime>)Options.GetTypeInfo(typeof(global::System.DateTime));
24+
}
25+
26+
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.DateTime> Create_DateTime(global::System.Text.Json.JsonSerializerOptions options)
27+
{
28+
if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.DateTime>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.DateTime> jsonTypeInfo))
29+
{
30+
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateValueInfo<global::System.DateTime>(options, global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.DateTimeConverter);
31+
}
32+
33+
jsonTypeInfo.OriginatingResolver = this;
34+
return jsonTypeInfo;
35+
}
36+
}
37+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
//HintName: IVariousTypesTools.Double.g.cs
2+
// <auto-generated/>
3+
4+
#nullable enable annotations
5+
#nullable disable warnings
6+
7+
// Suppress warnings about [Obsolete] member usage in generated code.
8+
#pragma warning disable CS0612, CS0618
9+
10+
namespace CSharpToJsonSchema.IntegrationTests
11+
{
12+
public partial class VariousTypesToolsExtensionsJsonSerializerContext
13+
{
14+
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<double>? _Double;
15+
16+
/// <summary>
17+
/// Defines the source generated JSON serialization contract metadata for a given type.
18+
/// </summary>
19+
#nullable disable annotations // Marking the property type as nullable-oblivious.
20+
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<double> Double
21+
#nullable enable annotations
22+
{
23+
get => _Double ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<double>)Options.GetTypeInfo(typeof(double));
24+
}
25+
26+
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<double> Create_Double(global::System.Text.Json.JsonSerializerOptions options)
27+
{
28+
if (!TryGetTypeInfoForRuntimeCustomConverter<double>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<double> jsonTypeInfo))
29+
{
30+
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateValueInfo<double>(options, global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.DoubleConverter);
31+
}
32+
33+
jsonTypeInfo.OriginatingResolver = this;
34+
return jsonTypeInfo;
35+
}
36+
}
37+
}

0 commit comments

Comments
 (0)