diff --git a/Activout.RestClient/Activout.RestClient.csproj b/Activout.RestClient/Activout.RestClient.csproj index fdbf3bd..32c0d36 100644 --- a/Activout.RestClient/Activout.RestClient.csproj +++ b/Activout.RestClient/Activout.RestClient.csproj @@ -2,11 +2,13 @@ net8.0 default + README.md - + + diff --git a/Activout.RestClient/Helpers/Implementation/TaskConverter3.cs b/Activout.RestClient/Helpers/Implementation/TaskConverter3.cs index 7e98bf6..ec26350 100644 --- a/Activout.RestClient/Helpers/Implementation/TaskConverter3.cs +++ b/Activout.RestClient/Helpers/Implementation/TaskConverter3.cs @@ -1,4 +1,3 @@ -using System; using System.Diagnostics; using System.Threading.Tasks; @@ -6,8 +5,6 @@ namespace Activout.RestClient.Helpers.Implementation; /* * Convert from Task to Task where T is the Type - * - * Implemented by creating a TaskCompletionSource and setting the result or exception */ public class TaskConverter3 : ITaskConverter { @@ -20,16 +17,6 @@ public object ConvertReturnType(Task task) [StackTraceHidden] private static async Task ConvertReturnTypeImpl(Task task) { - var taskCompletionSource = new TaskCompletionSource(); - try - { - taskCompletionSource.SetResult((T)await task); - } - catch (Exception e) - { - taskCompletionSource.SetException(e); - } - - return await taskCompletionSource.Task; + return (T)await task; } } \ No newline at end of file diff --git a/Activout.RestClient/README.md b/Activout.RestClient/README.md new file mode 120000 index 0000000..32d46ee --- /dev/null +++ b/Activout.RestClient/README.md @@ -0,0 +1 @@ +../README.md \ No newline at end of file