Skip to content

Commit 802f034

Browse files
committed
Shrink the public API of the library.
1 parent 5f60afa commit 802f034

File tree

12 files changed

+11
-75
lines changed

12 files changed

+11
-75
lines changed

src/Features/JsonPatch.SystemTextJson/src/Adapters/AdapterFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.JsonPatch.SystemTextJson.Adapters;
1313
/// <summary>
1414
/// The default AdapterFactory to be used for resolving <see cref="IAdapter"/>.
1515
/// </summary>
16-
public class AdapterFactory : IAdapterFactory
16+
internal class AdapterFactory : IAdapterFactory
1717
{
1818
internal static AdapterFactory Default { get; } = new();
1919

src/Features/JsonPatch.SystemTextJson/src/Adapters/ObjectAdapter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
namespace Microsoft.AspNetCore.JsonPatch.SystemTextJson.Adapters;
1212

1313
/// <inheritdoc />
14-
public class ObjectAdapter : IObjectAdapterWithTest
14+
internal class ObjectAdapter : IObjectAdapterWithTest
1515
{
1616
/// <summary>
1717
/// Initializes a new instance of <see cref="ObjectAdapter"/>.

src/Features/JsonPatch.SystemTextJson/src/Converters/JsonPatchDocumentConverter.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@
66
using System.Text.Json;
77
using System.Text.Json.Nodes;
88
using System.Text.Json.Serialization;
9-
using System.Text.Json.Serialization.Metadata;
109
using Microsoft.AspNetCore.JsonPatch.SystemTextJson.Operations;
11-
using Microsoft.AspNetCore.JsonPatch.SystemTextJson;
1210

1311
namespace Microsoft.AspNetCore.JsonPatch.SystemTextJson.Converters;
1412

15-
public class JsonPatchDocumentConverter : JsonConverter<JsonPatchDocument>
13+
internal class JsonPatchDocumentConverter : JsonConverter<JsonPatchDocument>
1614
{
1715
internal static JsonSerializerOptions DefaultSerializerOptions { get; } = JsonSerializerOptions.Default;
1816

src/Features/JsonPatch.SystemTextJson/src/Helpers/GetValueResult.cs

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/Features/JsonPatch.SystemTextJson/src/Internal/ConversionResult.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33

44
namespace Microsoft.AspNetCore.JsonPatch.SystemTextJson.Internal;
55

6-
/// <summary>
7-
/// This API supports infrastructure and is not intended to be used
8-
/// directly from your code. This API may change or be removed in future releases.
9-
/// </summary>
10-
public class ConversionResult
6+
internal class ConversionResult
117
{
128
public ConversionResult(bool canBeConverted, object convertedInstance)
139
{

src/Features/JsonPatch.SystemTextJson/src/Internal/ConversionResultProvider.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@
77

88
namespace Microsoft.AspNetCore.JsonPatch.SystemTextJson.Internal;
99

10-
/// <summary>
11-
/// This API supports infrastructure and is not intended to be used
12-
/// directly from your code. This API may change or be removed in future releases.
13-
/// </summary>
14-
public static class ConversionResultProvider
10+
internal static class ConversionResultProvider
1511
{
1612
public static ConversionResult ConvertTo(object value, Type typeToConvertTo)
1713
{

src/Features/JsonPatch.SystemTextJson/src/Internal/DictionaryAdapterOfTU.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@
88

99
namespace Microsoft.AspNetCore.JsonPatch.SystemTextJson.Internal;
1010

11-
/// <summary>
12-
/// This API supports infrastructure and is not intended to be used
13-
/// directly from your code. This API may change or be removed in future releases.
14-
/// </summary>
15-
public class DictionaryAdapter<TKey, TValue> : IAdapter
11+
internal class DictionaryAdapter<TKey, TValue> : IAdapter
1612
{
1713
public virtual bool TryAdd(
1814
object target,

src/Features/JsonPatch.SystemTextJson/src/Internal/JsonObjectAdapter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace Microsoft.AspNetCore.JsonPatch.SystemTextJson.Internal;
88

9-
public class JsonObjectAdapter : IAdapter
9+
internal class JsonObjectAdapter : IAdapter
1010
{
1111
public virtual bool TryAdd(
1212
object target,

src/Features/JsonPatch.SystemTextJson/src/Internal/ListAdapter.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,8 @@
1111

1212
namespace Microsoft.AspNetCore.JsonPatch.SystemTextJson.Internal;
1313

14-
/// <summary>
15-
/// This API supports infrastructure and is not intended to be used
16-
/// directly from your code. This API may change or be removed in future releases.
17-
/// </summary>
18-
public class ListAdapter : IAdapter
14+
internal class ListAdapter : IAdapter
1915
{
20-
#region Existing implementation
2116
public virtual bool TryAdd(object target, string segment, JsonSerializerOptions serializerOptions, object value, out string errorMessage)
2217
{
2318
if (!TryGetListTypeArgument(target, out var typeArgument, out errorMessage))
@@ -48,8 +43,6 @@ public virtual bool TryAdd(object target, string segment, JsonSerializerOptions
4843
errorMessage = null;
4944
return true;
5045
}
51-
#endregion
52-
5346
public virtual bool TryGet(object target, string segment, JsonSerializerOptions serializerOptions, out object value, out string errorMessage)
5447
{
5548
if (!TryGetListTypeArgument(target, out _, out errorMessage))

src/Features/JsonPatch.SystemTextJson/src/Internal/ObjectVisitor.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@
77

88
namespace Microsoft.AspNetCore.JsonPatch.SystemTextJson.Internal;
99

10-
/// <summary>
11-
/// This API supports infrastructure and is not intended to be used
12-
/// directly from your code. This API may change or be removed in future releases.
13-
/// </summary>
14-
public class ObjectVisitor
10+
internal class ObjectVisitor
1511
{
1612
private readonly IAdapterFactory _adapterFactory;
1713
private readonly JsonSerializerOptions _serializerOptions;

0 commit comments

Comments
 (0)