diff --git a/src/Consume/Consume.cs b/src/Consume/Consume.cs
index 77cd9e1f..8bd02d2d 100644
--- a/src/Consume/Consume.cs
+++ b/src/Consume/Consume.cs
@@ -105,7 +105,7 @@ class Consume
Debug.Log("Test log to make sure this is working");
}
-#if HTTPREFERENCED
+#if FetureHttp
static void Http()
{
diff --git a/src/Polyfill/Polyfill.targets b/src/Polyfill/Polyfill.targets
index 14b5fdbd..068a937b 100644
--- a/src/Polyfill/Polyfill.targets
+++ b/src/Polyfill/Polyfill.targets
@@ -2,7 +2,6 @@
$(PrepareForBuildDependsOn);PreparePolyfill
false
- false
$(TargetFramework.ToLower())
@@ -42,10 +41,8 @@
$(DefineConstants);TASKSEXTENSIONSREFERENCED
- true
$(DefineConstants);HTTPREFERENCED
+ Condition="@(PackageDependencies->WithMetadataValue('Identity', 'System.Net.Http')->Count()) != 0 OR @(Reference->WithMetadataValue('Identity', 'System.Net.Http')->Count()) != 0">$(DefineConstants);FetureHttp
$(DefineConstants);FeatureMemory;FeatureValueTuple
$(DefineConstants);FeatureMemory;FeatureValueTuple
diff --git a/src/Polyfill/Polyfill_HttpClient.cs b/src/Polyfill/Polyfill_HttpClient.cs
index 39b940af..80951443 100644
--- a/src/Polyfill/Polyfill_HttpClient.cs
+++ b/src/Polyfill/Polyfill_HttpClient.cs
@@ -2,7 +2,7 @@
#pragma warning disable
-#if ((NETFRAMEWORK && HTTPREFERENCED) || NETSTANDARD || NETCOREAPP2X || NETCOREAPP3X)
+#if ((NETFRAMEWORK && FetureHttp) || NETSTANDARD || NETCOREAPP2X || NETCOREAPP3X)
using System;
using System.IO;
diff --git a/src/Polyfill/Polyfill_HttpContent.cs b/src/Polyfill/Polyfill_HttpContent.cs
index 24715e98..55dfbde1 100644
--- a/src/Polyfill/Polyfill_HttpContent.cs
+++ b/src/Polyfill/Polyfill_HttpContent.cs
@@ -2,7 +2,7 @@
#pragma warning disable
-#if ((NETFRAMEWORK && HTTPREFERENCED) || NETSTANDARD || NETCOREAPP2X || NETCOREAPP3X)
+#if ((NETFRAMEWORK && FetureHttp) || NETSTANDARD || NETCOREAPP2X || NETCOREAPP3X)
using System.IO;
using System.Net.Http;
diff --git a/src/Polyfill/StringPolyfill.cs b/src/Polyfill/StringPolyfill.cs
index c9aad1f7..38e2afe5 100644
--- a/src/Polyfill/StringPolyfill.cs
+++ b/src/Polyfill/StringPolyfill.cs
@@ -18,7 +18,7 @@ static partial class StringPolyfill
public static string Join(char separator, string[] values)
{
#if NETSTANDARD2_0 || NETFRAMEWORK
- return string.Join(new(new[]{separator}), values);
+ return string.Join(new([separator]), values);
#else
return string.Join(separator, values);
#endif
@@ -27,16 +27,16 @@ public static string Join(char separator, string[] values)
public static string Join(char separator, object[] values)
{
#if NETSTANDARD2_0 || NETFRAMEWORK
- return string.Join(new(new[]{separator}), values);
+ return string.Join(new([separator]), values);
#else
return string.Join(separator, values);
#endif
}
- public static string Join (char separator, string?[] value, int startIndex, int count)
+ public static string Join(char separator, string?[] value, int startIndex, int count)
{
#if NETSTANDARD2_0 || NETFRAMEWORK
- return string.Join(new(new[]{separator}), value, startIndex, count);
+ return string.Join(new([separator]), value, startIndex, count);
#else
return string.Join(separator, value, startIndex, count);
#endif
@@ -45,7 +45,7 @@ public static string Join (char separator, string?[] value, int startIndex, int
public static string Join (char separator, IEnumerable values)
{
#if NETSTANDARD2_0 || NETFRAMEWORK
- return string.Join(new(new[]{separator}), values);
+ return string.Join(new([separator]), values);
#else
return string.Join(separator, values);
#endif
diff --git a/src/Tests/StringPolyfillTests.cs b/src/Tests/StringPolyfillTests.cs
index 8024a09f..b6cff1f5 100644
--- a/src/Tests/StringPolyfillTests.cs
+++ b/src/Tests/StringPolyfillTests.cs
@@ -6,7 +6,7 @@ partial class StringPolyfillTest
[Test]
public void Join()
{
- Assert.AreEqual("bac", StringPolyfill.Join('a', new []{"b","c"}));
+ Assert.AreEqual("bac", StringPolyfill.Join('a', ["b","c"]));
Assert.AreEqual("bac", StringPolyfill.Join('a', new object[]{"b","c"}));
}
}
\ No newline at end of file