diff --git a/src/libraries/System.Net.NameResolution/tests/PalTests/Fakes/FakeContextAwareResult.cs b/src/libraries/System.Net.NameResolution/tests/PalTests/Fakes/FakeContextAwareResult.cs deleted file mode 100644 index 647ac52396893..0000000000000 --- a/src/libraries/System.Net.NameResolution/tests/PalTests/Fakes/FakeContextAwareResult.cs +++ /dev/null @@ -1,90 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System.Threading; - -namespace System.Net -{ - internal partial class ContextAwareResult : IAsyncResult - { - private AsyncCallback _callback; - - private static Func _resultFactory; - - public static void FakeSetResultFactory(Func resultFactory) - { - _resultFactory = resultFactory; - } - - public object AsyncState - { - get - { - throw new NotImplementedException(); - } - } - - internal bool EndCalled - { - get; - set; - } - - internal object Result - { - get - { - return _resultFactory?.Invoke(); - } - } - - public WaitHandle AsyncWaitHandle - { - get - { - throw new NotImplementedException(); - } - } - - public bool CompletedSynchronously - { - get - { - // Simulate sync completion: - return true; - } - } - - public bool IsCompleted - { - get - { - throw new NotImplementedException(); - } - } - - internal ContextAwareResult(object myObject, object myState, AsyncCallback myCallBack) - { - _callback = myCallBack; - } - - internal object StartPostingAsyncOp(bool lockCapture) - { - return null; - } - - internal bool FinishPostingAsyncOp() - { - return true; - } - - internal void InvokeCallback(object result) - { - _callback.Invoke(this); - } - - internal void InternalWaitForCompletion() { } - - - } -} diff --git a/src/libraries/System.Net.NameResolution/tests/PalTests/System.Net.NameResolution.Pal.Tests.csproj b/src/libraries/System.Net.NameResolution/tests/PalTests/System.Net.NameResolution.Pal.Tests.csproj index 8dff1e58cf78e..e0aa8f994b0c0 100644 --- a/src/libraries/System.Net.NameResolution/tests/PalTests/System.Net.NameResolution.Pal.Tests.csproj +++ b/src/libraries/System.Net.NameResolution/tests/PalTests/System.Net.NameResolution.Pal.Tests.csproj @@ -13,7 +13,6 @@ -