From d228aa917e00f6ad83c24c5762b9076ab3288258 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 1 Sep 2021 09:37:13 -0400 Subject: [PATCH] Remove usage of [AggressiveOptimization] (#58253) Co-authored-by: Steve Harter --- .../Json/Serialization/Converters/Object/ObjectDefaultConverter.cs | 6 ------ .../src/System/Text/Json/Serialization/JsonConverterOfT.cs | 6 ------ 2 files changed, 12 deletions(-) diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Object/ObjectDefaultConverter.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Object/ObjectDefaultConverter.cs index 60708ae..c12debe 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Object/ObjectDefaultConverter.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Object/ObjectDefaultConverter.cs @@ -16,9 +16,6 @@ namespace System.Text.Json.Serialization.Converters { internal override bool CanHaveIdMetadata => true; -#if NET6_0_OR_GREATER - [MethodImpl(MethodImplOptions.AggressiveOptimization)] -#endif internal override bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, ref ReadStack state, [MaybeNullWhen(false)] out T value) { JsonTypeInfo jsonTypeInfo = state.Current.JsonTypeInfo; @@ -249,9 +246,6 @@ namespace System.Text.Json.Serialization.Converters return true; } -#if NET6_0_OR_GREATER - [MethodImpl(MethodImplOptions.AggressiveOptimization)] -#endif internal sealed override bool OnTryWrite( Utf8JsonWriter writer, T value, diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs index e152005..497c380 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs @@ -144,9 +144,6 @@ namespace System.Text.Json.Serialization /// Note that the value of determines if the converter handles null JSON tokens. public abstract T? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options); -#if NET6_0_OR_GREATER - [MethodImpl(MethodImplOptions.AggressiveOptimization)] -#endif internal bool TryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, ref ReadStack state, out T? value) { if (ConverterStrategy == ConverterStrategy.Value) @@ -320,9 +317,6 @@ namespace System.Text.Json.Serialization /// private static bool IsNull(T value) => value is null; -#if NET6_0_OR_GREATER - [MethodImpl(MethodImplOptions.AggressiveOptimization)] -#endif internal bool TryWrite(Utf8JsonWriter writer, in T value, JsonSerializerOptions options, ref WriteStack state) { if (writer.CurrentDepth >= options.EffectiveMaxDepth) -- 2.7.4