Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: optional parameters alignments for serialization methods #367

Merged
merged 3 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.12.3] - 2024-09-03

### Changed

- Fixed optional parameters in KiotaJsonSerialization. [#366](https://github.com/microsoft/kiota-dotnet/issues/366)

## [1.12.2] - 2024-08-23

### Changed

- Fixed a bug where calls to ApiClientBuilder.EnableBackingStoreForParseNodeFactory and ApiClientBuilder.EnableBackingStoreForSerializationWriterFactory would enable a BackingStore around BackingStores. [#2563] (https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/2563) [#2588] (https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/2588)
- Fixed a bug where calls to ApiClientBuilder.EnableBackingStoreForParseNodeFactory and ApiClientBuilder.EnableBackingStoreForSerializationWriterFactory would enable a BackingStore around BackingStores. [#2563] (<https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/2563>) [#2588] (<https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/2588>)

## [1.12.1] - 2024-08-21

Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<!-- Common default project properties for ALL projects-->
<PropertyGroup>
<VersionPrefix>1.12.2</VersionPrefix>
<VersionPrefix>1.12.3</VersionPrefix>
<VersionSuffix></VersionSuffix>
<!-- This is overidden in test projects by setting to true-->
<IsTestProject>false</IsTestProject>
Expand Down
3 changes: 3 additions & 0 deletions src/abstractions/RequestInformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.Serialization;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;

#if NET5_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
Expand Down Expand Up @@ -316,6 +318,7 @@ public void SetResponseHandler(IResponseHandler responseHandler)
/// </summary>
/// <param name="content">The binary stream to set as a body.</param>
[Obsolete("Use SetStreamContent and pass the content type instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetStreamContent(Stream content) => SetStreamContent(content, BinaryContentType);

/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions src/abstractions/serialization/IParseNodeFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// ------------------------------------------------------------------------------

using System;
using System.ComponentModel;
using System.IO;

namespace Microsoft.Kiota.Abstractions.Serialization
Expand All @@ -23,6 +24,7 @@ public interface IParseNodeFactory
/// <param name="contentType">The content type of the parse node.</param>
/// <returns>A parse node.</returns>
[Obsolete("Use GetRootParseNodeAsync instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
IParseNode GetRootParseNode(string contentType, Stream content);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Threading;
using System.Threading.Tasks;

#if NET5_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
Expand All @@ -25,6 +27,7 @@ public static partial class KiotaJsonSerializer
/// <param name="parsableFactory">The factory to create the object.</param>
/// <param name="serializedRepresentation">The serialized representation of the object.</param>
[Obsolete("Use DeserializeAsync instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static T? Deserialize<T>(string serializedRepresentation, ParsableFactory<T> parsableFactory) where T : IParsable
=> KiotaSerializer.Deserialize(_jsonContentType, serializedRepresentation, parsableFactory);
/// <summary>
Expand All @@ -33,13 +36,15 @@ public static partial class KiotaJsonSerializer
/// <param name="stream">The stream to deserialize.</param>
/// <param name="parsableFactory">The factory to create the object.</param>
[Obsolete("Use DeserializeAsync instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static T? Deserialize<T>(Stream stream, ParsableFactory<T> parsableFactory) where T : IParsable
=> KiotaSerializer.Deserialize(_jsonContentType, stream, parsableFactory);
/// <summary>
/// Deserializes the given stream into an object.
/// </summary>
/// <param name="stream">The stream to deserialize.</param>
[Obsolete("Use DeserializeAsync instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
#if NET5_0_OR_GREATER
public static T? Deserialize<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] T>(Stream stream) where T : IParsable
#else
Expand All @@ -51,6 +56,7 @@ public static partial class KiotaJsonSerializer
/// </summary>
/// <param name="serializedRepresentation">The serialized representation of the object.</param>
[Obsolete("Use DeserializeAsync instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
#if NET5_0_OR_GREATER
public static T? Deserialize<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] T>(string serializedRepresentation) where T : IParsable
#else
Expand All @@ -63,6 +69,7 @@ public static partial class KiotaJsonSerializer
/// <param name="stream">The stream to deserialize.</param>
/// <param name="parsableFactory">The factory to create the object.</param>
[Obsolete("Use DeserializeCollectionAsync instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static IEnumerable<T> DeserializeCollection<T>(Stream stream, ParsableFactory<T> parsableFactory) where T : IParsable
=> KiotaSerializer.DeserializeCollection(_jsonContentType, stream, parsableFactory);
/// <summary>
Expand All @@ -71,13 +78,15 @@ public static IEnumerable<T> DeserializeCollection<T>(Stream stream, ParsableFac
/// <param name="serializedRepresentation">The serialized representation of the objects.</param>
/// <param name="parsableFactory">The factory to create the object.</param>
[Obsolete("Use DeserializeCollectionAsync instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static IEnumerable<T> DeserializeCollection<T>(string serializedRepresentation, ParsableFactory<T> parsableFactory) where T : IParsable
=> KiotaSerializer.DeserializeCollection(_jsonContentType, serializedRepresentation, parsableFactory);
/// <summary>
/// Deserializes the given stream into a collection of objects based on the content type.
/// </summary>
/// <param name="stream">The stream to deserialize.</param>
[Obsolete("Use DeserializeCollectionAsync instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
#if NET5_0_OR_GREATER
public static IEnumerable<T> DeserializeCollection<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] T>(Stream stream) where T : IParsable
#else
Expand All @@ -89,6 +98,7 @@ public static IEnumerable<T> DeserializeCollection<T>(Stream stream) where T : I
/// </summary>
/// <param name="serializedRepresentation">The serialized representation of the object.</param>
[Obsolete("Use DeserializeCollectionAsync instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
#if NET5_0_OR_GREATER
public static IEnumerable<T> DeserializeCollection<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] T>(string serializedRepresentation) where T : IParsable
#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
/// </summary>
/// <typeparam name="T">Type of the object to serialize</typeparam>
/// <param name="value">The object to serialize.</param>
/// <param name="serializeOnlyChangedValues">By default, you'll only get the changed properties.</param>
/// <returns>The serialized representation as a stream.</returns>
public static Stream SerializeAsStream<T>(T value) where T : IParsable
=> KiotaSerializer.SerializeAsStream(_jsonContentType, value);
public static Stream SerializeAsStream<T>(T value, bool serializeOnlyChangedValues = true) where T : IParsable

Check warning on line 27 in src/abstractions/serialization/KiotaJsonSerializer.Serialization.cs

View workflow job for this annotation

GitHub Actions / Build

All 'SerializeAsStream' method overloads should be adjacent. (https://rules.sonarsource.com/csharp/RSPEC-4136)
=> KiotaSerializer.SerializeAsStream(_jsonContentType, value, serializeOnlyChangedValues);

/// <summary>
/// Serializes the given object into a string based on the content type.
Expand All @@ -34,7 +35,7 @@
/// <returns>The serialized representation as a string.</returns>
[Obsolete("This method is obsolete, use SerializeAsStringAsync instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static string SerializeAsString<T>(T value) where T : IParsable

Check warning on line 38 in src/abstractions/serialization/KiotaJsonSerializer.Serialization.cs

View workflow job for this annotation

GitHub Actions / Build

All 'SerializeAsString' method overloads should be adjacent. (https://rules.sonarsource.com/csharp/RSPEC-4136)
=> KiotaSerializer.SerializeAsString(_jsonContentType, value);

/// <summary>
Expand All @@ -44,17 +45,31 @@
/// <param name="value">The object to serialize.</param>
/// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
/// <returns>The serialized representation as a string.</returns>
[Obsolete("This method is obsolete, use SerializeAsStringAsync with optional CancellationToken parameter instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static Task<string> SerializeAsStringAsync<T>(T value, CancellationToken cancellationToken) where T : IParsable

Check warning on line 50 in src/abstractions/serialization/KiotaJsonSerializer.Serialization.cs

View workflow job for this annotation

GitHub Actions / Build

All 'SerializeAsStringAsync' method overloads should be adjacent. (https://rules.sonarsource.com/csharp/RSPEC-4136)
=> KiotaSerializer.SerializeAsStringAsync(_jsonContentType, value, true, cancellationToken);
=> SerializeAsStringAsync(value, true, cancellationToken);

/// <summary>
/// Serializes the given object into a string based on the content type.
/// </summary>
/// <typeparam name="T">Type of the object to serialize</typeparam>
/// <param name="value">The object to serialize.</param>
/// <param name="serializeOnlyChangedValues">By default, you'll only get the changed properties.</param>
/// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
/// <returns>The serialized representation as a string.</returns>
public static Task<string> SerializeAsStringAsync<T>(T value, bool serializeOnlyChangedValues = true, CancellationToken cancellationToken = default) where T : IParsable
=> KiotaSerializer.SerializeAsStringAsync(_jsonContentType, value, serializeOnlyChangedValues, cancellationToken);

/// <summary>
/// Serializes the given object into a string based on the content type.
/// </summary>
/// <typeparam name="T">Type of the object to serialize</typeparam>
/// <param name="value">The object to serialize.</param>
/// <param name="serializeOnlyChangedValues">By default, you'll only get the changed properties.</param>
/// <returns>The serialized representation as a stream.</returns>
public static Stream SerializeAsStream<T>(IEnumerable<T> value) where T : IParsable
=> KiotaSerializer.SerializeAsStream(_jsonContentType, value);
public static Stream SerializeAsStream<T>(IEnumerable<T> value, bool serializeOnlyChangedValues = true) where T : IParsable
=> KiotaSerializer.SerializeAsStream(_jsonContentType, value, serializeOnlyChangedValues);

/// <summary>
/// Serializes the given object into a string based on the content type.
Expand All @@ -73,6 +88,19 @@
/// <param name="value">The object to serialize.</param>
/// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
/// <returns>The serialized representation as a string.</returns>
[Obsolete("This method is obsolete, use SerializeAsStringAsync with optional CancellationToken parameter instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static Task<string> SerializeAsStringAsync<T>(IEnumerable<T> value, CancellationToken cancellationToken) where T : IParsable =>
KiotaSerializer.SerializeAsStringAsync(_jsonContentType, value, true, cancellationToken);
SerializeAsStringAsync(value, true, cancellationToken);

/// <summary>
/// Serializes the given object into a string based on the content type.
/// </summary>
/// <typeparam name="T">Type of the object to serialize</typeparam>
/// <param name="value">The object to serialize.</param>
/// <param name="serializeOnlyChangedValues">By default, you'll only get the changed properties.</param>
/// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
/// <returns>The serialized representation as a string.</returns>
public static Task<string> SerializeAsStringAsync<T>(IEnumerable<T> value, bool serializeOnlyChangedValues = true, CancellationToken cancellationToken = default) where T : IParsable =>
KiotaSerializer.SerializeAsStringAsync(_jsonContentType, value, serializeOnlyChangedValues, cancellationToken);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

#if NET5_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
Expand All @@ -24,7 +26,8 @@
/// <param name="parsableFactory">The factory to create the object.</param>
/// <param name="serializedRepresentation">The serialized representation of the object.</param>
[Obsolete("Use DeserializeAsync instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static T? Deserialize<T>(string contentType, string serializedRepresentation, ParsableFactory<T> parsableFactory) where T : IParsable

Check warning on line 30 in src/abstractions/serialization/KiotaSerializer.Deserialization.cs

View workflow job for this annotation

GitHub Actions / Build

All 'Deserialize' method overloads should be adjacent. (https://rules.sonarsource.com/csharp/RSPEC-4136)
{
if(string.IsNullOrEmpty(serializedRepresentation)) throw new ArgumentNullException(nameof(serializedRepresentation));
using var stream = GetStreamFromString(serializedRepresentation);
Expand All @@ -49,6 +52,7 @@
/// <param name="stream">The stream to deserialize.</param>
/// <param name="parsableFactory">The factory to create the object.</param>
[Obsolete("Use DeserializeAsync instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static T? Deserialize<T>(string contentType, Stream stream, ParsableFactory<T> parsableFactory) where T : IParsable
{
if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType));
Expand All @@ -63,6 +67,7 @@
/// <param name="contentType">The content type of the stream.</param>
/// <param name="stream">The stream to deserialize.</param>
[Obsolete("Use DeserializeAsync instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
#if NET5_0_OR_GREATER
public static T? Deserialize<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] T>(string contentType, Stream stream) where T : IParsable
#else
Expand All @@ -86,6 +91,7 @@
/// <param name="contentType">The content type of the stream.</param>
/// <param name="serializedRepresentation">The serialized representation of the object.</param>
[Obsolete("Use DeserializeAsync instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
#if NET5_0_OR_GREATER
public static T? Deserialize<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] T>(string contentType, string serializedRepresentation) where T : IParsable
#else
Expand All @@ -100,6 +106,7 @@
/// <param name="stream">The stream to deserialize.</param>
/// <param name="parsableFactory">The factory to create the object.</param>
[Obsolete("Use DeserializeCollectionAsync instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static IEnumerable<T> DeserializeCollection<T>(string contentType, Stream stream, ParsableFactory<T> parsableFactory) where T : IParsable
{
if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType));
Expand All @@ -115,6 +122,7 @@
/// <param name="serializedRepresentation">The serialized representation of the objects.</param>
/// <param name="parsableFactory">The factory to create the object.</param>
[Obsolete("Use DeserializeCollectionAsync instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static IEnumerable<T> DeserializeCollection<T>(string contentType, string serializedRepresentation, ParsableFactory<T> parsableFactory) where T : IParsable
{
if(string.IsNullOrEmpty(serializedRepresentation)) throw new ArgumentNullException(nameof(serializedRepresentation));
Expand All @@ -127,6 +135,7 @@
/// <param name="contentType">The content type of the stream.</param>
/// <param name="stream">The stream to deserialize.</param>
[Obsolete("Use DeserializeCollectionAsync instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
#if NET5_0_OR_GREATER
public static IEnumerable<T> DeserializeCollection<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] T>(string contentType, Stream stream) where T : IParsable
#else
Expand All @@ -139,6 +148,7 @@
/// <param name="contentType">The content type of the stream.</param>
/// <param name="serializedRepresentation">The serialized representation of the object.</param>
[Obsolete("Use DeserializeCollectionAsync instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
#if NET5_0_OR_GREATER
public static IEnumerable<T> DeserializeCollection<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] T>(string contentType, string serializedRepresentation) where T : IParsable
#else
Expand All @@ -153,7 +163,7 @@
/// <param name="parsableFactory">The factory to create the object.</param>
/// <param name="serializedRepresentation">The serialized representation of the object.</param>
/// <param name="cancellationToken">The cancellation token for the task</param>
public static async Task<T?> DeserializeAsync<T>(string contentType, string serializedRepresentation, ParsableFactory<T> parsableFactory,

Check warning on line 166 in src/abstractions/serialization/KiotaSerializer.Deserialization.cs

View workflow job for this annotation

GitHub Actions / Build

All 'DeserializeAsync' method overloads should be adjacent. (https://rules.sonarsource.com/csharp/RSPEC-4136)
CancellationToken cancellationToken = default) where T : IParsable
{
if(string.IsNullOrEmpty(serializedRepresentation)) throw new ArgumentNullException(nameof(serializedRepresentation));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
/// <param name="value">The object to serialize.</param>
/// <param name="serializeOnlyChangedValues">By default, you'll only get the changed properties.</param>
/// <returns>The serialized representation as a stream.</returns>
public static Stream SerializeAsStream<T>(string contentType, T value, bool serializeOnlyChangedValues = true) where T : IParsable

Check warning on line 33 in src/abstractions/serialization/KiotaSerializer.Serialization.cs

View workflow job for this annotation

GitHub Actions / Build

All 'SerializeAsStream' method overloads should be adjacent. (https://rules.sonarsource.com/csharp/RSPEC-4136)
{
using var writer = GetSerializationWriter(contentType, value, serializeOnlyChangedValues);
writer.WriteObjectValue(null, value);
Expand All @@ -45,7 +45,8 @@
/// <param name="value">The object to serialize.</param>
/// <returns>The serialized representation as a string.</returns>
[Obsolete("This method is obsolete, use the async method instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static string SerializeAsString<T>(string contentType, T value) where T : IParsable

Check warning on line 49 in src/abstractions/serialization/KiotaSerializer.Serialization.cs

View workflow job for this annotation

GitHub Actions / Build

All 'SerializeAsString' method overloads should be adjacent. (https://rules.sonarsource.com/csharp/RSPEC-4136)
{
using var stream = SerializeAsStream(contentType, value);
return GetStringFromStream(stream);
Expand All @@ -59,7 +60,7 @@
/// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
/// <returns>The serialized representation as a string.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public static Task<string> SerializeAsStringAsync<T>(string contentType, T value, CancellationToken cancellationToken) where T : IParsable => SerializeAsStringAsync(contentType, value, true, cancellationToken);

Check warning on line 63 in src/abstractions/serialization/KiotaSerializer.Serialization.cs

View workflow job for this annotation

GitHub Actions / Build

All 'SerializeAsStringAsync' method overloads should be adjacent. (https://rules.sonarsource.com/csharp/RSPEC-4136)
/// <summary>
/// Serializes the given object into a string based on the content type.
/// </summary>
Expand Down Expand Up @@ -97,6 +98,7 @@
/// <param name="value">The object to serialize.</param>
/// <returns>The serialized representation as a string.</returns>
[Obsolete("This method is obsolete, use the async method instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static string SerializeAsString<T>(string contentType, IEnumerable<T> value) where T : IParsable
{
using var stream = SerializeAsStream(contentType, value);
Expand Down
2 changes: 2 additions & 0 deletions src/abstractions/serialization/ParseNodeFactoryRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

using System;
using System.Collections.Concurrent;
using System.ComponentModel;
using System.IO;
using System.Text.RegularExpressions;
using System.Threading;
Expand Down Expand Up @@ -34,7 +35,7 @@
/// List of factories that are registered by content type.
/// </summary>
public ConcurrentDictionary<string, IParseNodeFactory> ContentTypeAssociatedFactories { get; set; } = new();
internal static readonly Regex contentTypeVendorCleanupRegex = new(@"[^/]+\+", RegexOptions.Compiled);

Check warning on line 38 in src/abstractions/serialization/ParseNodeFactoryRegistry.cs

View workflow job for this annotation

GitHub Actions / Build

Pass a timeout to limit the execution time. (https://rules.sonarsource.com/csharp/RSPEC-6444)

/// <summary>
/// Get the <see cref="IParseNode"/> instance that is the root of the content
Expand All @@ -43,6 +44,7 @@
/// <param name="content">The <see cref="Stream"/> to parse</param>
/// <returns></returns>
[Obsolete("Use GetRootParseNodeAsync instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public IParseNode GetRootParseNode(string contentType, Stream content)
{
if(string.IsNullOrEmpty(contentType))
Expand Down
2 changes: 2 additions & 0 deletions src/abstractions/serialization/ParseNodeProxyFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// ------------------------------------------------------------------------------

using System;
using System.ComponentModel;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -39,7 +40,8 @@
/// <param name="content">The stream to read the parse node from.</param>
/// <param name="contentType">The content type of the parse node.</param>
/// <returns>A parse node.</returns>
[Obsolete("Use GetRootParseNodeAsync instead")]

Check warning on line 43 in src/abstractions/serialization/ParseNodeProxyFactory.cs

View workflow job for this annotation

GitHub Actions / Build

Do not forget to remove this deprecated code someday. (https://rules.sonarsource.com/csharp/RSPEC-1133)
[EditorBrowsable(EditorBrowsableState.Never)]
public IParseNode GetRootParseNode(string contentType, Stream content)
{
var node = _concrete.GetRootParseNode(contentType, content);
Expand Down
Loading
Loading