Skip to content

Commit

Permalink
Removing extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
svrooij committed Aug 19, 2024
1 parent 8919b34 commit a4a03d8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 166 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ public static partial class KiotaJsonSerializer
/// <typeparam name="T">Type of the object to serialize</typeparam>
/// <param name="value">The object to serialize.</param>
/// <returns>The serialized representation as a stream.</returns>
[Obsolete("This method is obsolete, use the extension methods in Microsoft.Kiota.Serialization.Json.IParsableExtensions instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static Stream SerializeAsStream<T>(T value) where T : IParsable
=> KiotaSerializer.SerializeAsStream(_jsonContentType, value);

Expand All @@ -34,7 +32,7 @@ public static Stream SerializeAsStream<T>(T value) where T : IParsable
/// <typeparam name="T">Type of the object to serialize</typeparam>
/// <param name="value">The object to serialize.</param>
/// <returns>The serialized representation as a string.</returns>
[Obsolete("This method is obsolete, use the extension methods in Microsoft.Kiota.Serialization.Json.IParsableExtensions instead")]
[Obsolete("This method is obsolete, use SerializeAsStringAsync instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static string SerializeAsString<T>(T value) where T : IParsable
=> KiotaSerializer.SerializeAsString(_jsonContentType, value);
Expand All @@ -46,8 +44,6 @@ public static string SerializeAsString<T>(T value) where T : IParsable
/// <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 the extension methods in Microsoft.Kiota.Serialization.Json.IParsableExtensions instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static Task<string> SerializeAsStringAsync<T>(T value, CancellationToken cancellationToken) where T : IParsable
=> KiotaSerializer.SerializeAsStringAsync(_jsonContentType, value, true, cancellationToken);

Expand All @@ -57,8 +53,6 @@ public static Task<string> SerializeAsStringAsync<T>(T value, CancellationToken
/// <typeparam name="T">Type of the object to serialize</typeparam>
/// <param name="value">The object to serialize.</param>
/// <returns>The serialized representation as a stream.</returns>
[Obsolete("This method is obsolete, use the extension methods in Microsoft.Kiota.Serialization.Json.IParsableExtensions instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static Stream SerializeAsStream<T>(IEnumerable<T> value) where T : IParsable
=> KiotaSerializer.SerializeAsStream(_jsonContentType, value);

Expand All @@ -68,7 +62,7 @@ public static Stream SerializeAsStream<T>(IEnumerable<T> value) where T : IParsa
/// <typeparam name="T">Type of the object to serialize</typeparam>
/// <param name="value">The object to serialize.</param>
/// <returns>The serialized representation as a string.</returns>
[Obsolete("This method is obsolete, use the extension methods in Microsoft.Kiota.Serialization.Json.IParsableExtensions instead")]
[Obsolete("This method is obsolete, use SerializeAsStringAsync instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static string SerializeAsString<T>(IEnumerable<T> value) where T : IParsable
=> KiotaSerializer.SerializeAsString(_jsonContentType, value);
Expand All @@ -79,8 +73,6 @@ public static string SerializeAsString<T>(IEnumerable<T> value) where T : IParsa
/// <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 the extension methods in Microsoft.Kiota.Serialization.Json.IParsableExtensions instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static Task<string> SerializeAsStringAsync<T>(IEnumerable<T> value, CancellationToken cancellationToken) where T : IParsable =>
KiotaSerializer.SerializeAsStringAsync(_jsonContentType, value, true, cancellationToken);
}
78 changes: 0 additions & 78 deletions src/serialization/form/IParsableExtensions.cs

This file was deleted.

78 changes: 0 additions & 78 deletions src/serialization/json/IParsableExtensions.cs

This file was deleted.

0 comments on commit a4a03d8

Please sign in to comment.