diff --git a/src/ComputeSharp.Graphics/Commands/Interop/ID3D12CommandAllocatorPool.cs b/src/ComputeSharp.Graphics/Commands/Interop/ID3D12CommandAllocatorPool.cs
index fe88514c..85461480 100644
--- a/src/ComputeSharp.Graphics/Commands/Interop/ID3D12CommandAllocatorPool.cs
+++ b/src/ComputeSharp.Graphics/Commands/Interop/ID3D12CommandAllocatorPool.cs
@@ -2,9 +2,6 @@
using System.Collections.Generic;
using ComputeSharp.Core.Extensions;
using ComputeSharp.Graphics.Extensions;
-#if NETSTANDARD2_0
-using ComputeSharp.System.Collections.Generic;
-#endif
using TerraFX.Interop;
namespace ComputeSharp.Graphics.Commands.Interop
diff --git a/src/ComputeSharp.Graphics/Properties/Polyfills.cs b/src/ComputeSharp.Graphics/Properties/Polyfills.cs
index d9c2c634..1e457f1a 100644
--- a/src/ComputeSharp.Graphics/Properties/Polyfills.cs
+++ b/src/ComputeSharp.Graphics/Properties/Polyfills.cs
@@ -1,5 +1,6 @@
-using System;
-using System.Collections.Generic;
+#if NETSTANDARD2_0
+
+using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -25,36 +26,6 @@ namespace ComputeSharp
}
}
- namespace Collections.Generic
- {
- ///
- /// Extensions for the type.
- ///
- internal static class QueueExtensions
- {
- ///
- /// Removes the object at the beginning of the instance and copies it to the result parameter.
- ///
- /// The type of values in the input .
- /// The input .
- /// The removed object.
- /// Whether or not the object was successfully removed.
- public static bool TryDequeue(this Queue queue, out T? result)
- {
- if (queue.Count > 0)
- {
- result = queue.Dequeue();
-
- return true;
- }
-
- result = default;
-
- return false;
- }
- }
- }
-
namespace Runtime.InteropServices
{
///
@@ -120,3 +91,35 @@ namespace ComputeSharp
}
}
}
+
+namespace System.Collections.Generic
+{
+ ///
+ /// Extensions for the type.
+ ///
+ internal static class QueueExtensions
+ {
+ ///
+ /// Removes the object at the beginning of the instance and copies it to the result parameter.
+ ///
+ /// The type of values in the input .
+ /// The input .
+ /// The removed object.
+ /// Whether or not the object was successfully removed.
+ public static bool TryDequeue(this Queue queue, out T? result)
+ {
+ if (queue.Count > 0)
+ {
+ result = queue.Dequeue();
+
+ return true;
+ }
+
+ result = default;
+
+ return false;
+ }
+ }
+}
+
+#endif