Skip to content

Commit 0701e2c

Browse files
authored
Address new AOT warnings in dotnet 9 (#173)
1 parent f13a976 commit 0701e2c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Elastic.Transport/Responses/Dynamic/DynamicDictionary.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ namespace Elastic.Transport;
2525
/// <summary>
2626
/// A dictionary that supports dynamic access.
2727
/// </summary>
28+
[UnconditionalSuppressMessage("AotAnalysis", "IL3050:RequiresDynamicCode", Justification = "Manually verified")]
2829
public sealed class DynamicDictionary
2930
: DynamicObject,
3031
IEquatable<DynamicDictionary>,

src/Elastic.Transport/Responses/Dynamic/DynamicValue.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
using System.Globalization;
1212
using System.Linq;
1313
using System.Linq.Expressions;
14-
using System.Runtime.CompilerServices;
1514
using System.Text.Json;
1615
//using Microsoft.CSharp.RuntimeBinder;
1716
using Elastic.Transport.Extensions;
@@ -30,7 +29,7 @@ namespace Elastic.Transport;
3029
///
3130
/// <para>This is `dynamic` through <see cref="DynamicObject"/> and supports direct casting various valuetypes</para>
3231
/// <para>Since `dynamic` can be scary in .NET this response also exposes a safe traversal mechanism under
33-
/// <see cref="Get{T}"/> which support an xpath'esque syntax to fish for values in the returned json.
32+
/// <see cref="Get{T}"/> which support a xpath'esque syntax to fish for values in the returned json.
3433
/// </para>
3534
/// </summary>
3635
public sealed class DynamicValue : DynamicObject, IEquatable<DynamicValue>, IConvertible, IReadOnlyCollection<DynamicValue>
@@ -41,6 +40,7 @@ public sealed class DynamicValue : DynamicObject, IEquatable<DynamicValue>, ICon
4140
/// Initializes a new instance of the <see cref="DynamicValue" /> class.
4241
/// </summary>
4342
/// <param name="value">The value to store in the instance</param>
43+
[UnconditionalSuppressMessage("AotAnalysis", "IL3050:RequiresDynamicCode", Justification = "Manually verified")]
4444
public DynamicValue(object value) => _value = value is DynamicValue av ? av.Value : value;
4545

4646
/// <summary>

0 commit comments

Comments
 (0)