mirror of
https://github.com/microsoft/semantic-kernel.git
synced 2026-10-12 02:19:06 +00:00
Removed CallerArgumentExpressionAttribute to fix support for dotnet 6 (#901)
### Motivation and Context Build was failing on systems with dotnet 6 installed (and not dotnet 7) ### Description Removed CallerArgumentExpressionAttribute and its usage.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
@@ -21,3 +21,4 @@ internal sealed class CallerArgumentExpressionAttribute : Attribute
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ internal static class Verify
|
||||
|
||||
// Equivalent of ArgumentNullException.ThrowIfNull
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static void NotNull([NotNull] object? obj, [CallerArgumentExpression(nameof(obj))] string? paramName = null)
|
||||
internal static void NotNull([NotNull] object? obj, [CallerArgumentExpression("obj")] string? paramName = null)
|
||||
{
|
||||
if (obj is null)
|
||||
{
|
||||
@@ -26,7 +26,7 @@ internal static class Verify
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static void NotNullOrWhiteSpace([NotNull] string? str, [CallerArgumentExpression(nameof(str))] string? paramName = null)
|
||||
internal static void NotNullOrWhiteSpace([NotNull] string? str, [CallerArgumentExpression("str")] string? paramName = null)
|
||||
{
|
||||
NotNull(str, paramName);
|
||||
if (string.IsNullOrWhiteSpace(str))
|
||||
@@ -62,7 +62,7 @@ internal static class Verify
|
||||
}
|
||||
}
|
||||
|
||||
internal static void StartsWith(string text, string prefix, string message, [CallerArgumentExpression(nameof(text))] string? textParamName = null)
|
||||
internal static void StartsWith(string text, string prefix, string message, [CallerArgumentExpression("text")] string? textParamName = null)
|
||||
{
|
||||
Debug.Assert(prefix is not null);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user