-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
91 changed files
with
1,207 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Suppressing errors for Test projects under dotnet folder | ||
[*.cs] | ||
dotnet_diagnostic.CA2007.severity = none # Do not directly await a Task | ||
dotnet_diagnostic.VSTHRD111.severity = none # Use .ConfigureAwait(bool) is hidden by default, set to none to prevent IDE from changing on autosave | ||
|
29 changes: 29 additions & 0 deletions
29
dotnet/src/Extensions/Extensions.UnitTests/Extensions.UnitTests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<AssemblyName>SemanticKernel.Extensions.UnitTests</AssemblyName> | ||
<RootNamespace>SemanticKernel.Extensions.UnitTests</RootNamespace> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>disable</ImplicitUsings> | ||
<IsPackable>false</IsPackable> | ||
<NoWarn>CA2007,VSTHRD111</NoWarn> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" /> | ||
<PackageReference Include="Moq" /> | ||
<PackageReference Include="xunit" /> | ||
<PackageReference Include="xunit.runner.visualstudio"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Console" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Planning.ActionPlanner\Planning.ActionPlanner.csproj" /> | ||
<ProjectReference Include="..\Planning.SequentialPlanner\Planning.SequentialPlanner.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...nsions/Extensions.UnitTests/Planning/SequentialPlanner/TestHelpers/ExceptionExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
|
||
using System.Threading; | ||
|
||
#pragma warning disable IDE0130 | ||
// ReSharper disable once CheckNamespace - Using NS of Exception | ||
namespace System; | ||
#pragma warning restore IDE0130 | ||
|
||
/// <summary> | ||
/// Exception extension methods. | ||
/// </summary> | ||
internal static class ExceptionExtensions | ||
{ | ||
/// <summary> | ||
/// Check if an exception is of a type that should not be caught by the kernel. | ||
/// </summary> | ||
/// <param name="ex">Exception.</param> | ||
/// <returns>True if <paramref name="ex"/> is a critical exception and should not be caught.</returns> | ||
internal static bool IsCriticalException(this Exception ex) | ||
=> ex is OutOfMemoryException | ||
or ThreadAbortException | ||
or AccessViolationException | ||
or AppDomainUnloadedException | ||
or BadImageFormatException | ||
or CannotUnloadAppDomainException | ||
or InvalidProgramException | ||
or StackOverflowException; | ||
} |
6 changes: 2 additions & 4 deletions
6
...Kernel/Planning/FunctionViewExtensions.cs → ...ner/TestHelpers/FunctionViewExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
...tration/Extensions/SKContextExtensions.cs → ...lanner/TestHelpers/SKContextExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.