diff --git a/src/Acheve.TestHost/Acheve.TestHost.csproj b/src/Acheve.TestHost/Acheve.TestHost.csproj
index 7eace34..eb4ab56 100644
--- a/src/Acheve.TestHost/Acheve.TestHost.csproj
+++ b/src/Acheve.TestHost/Acheve.TestHost.csproj
@@ -15,7 +15,6 @@
-
diff --git a/src/Acheve.TestHost/HttpResponseMessageExtensions.cs b/src/Acheve.TestHost/HttpResponseMessageExtensions.cs
index b7078a4..b5702ee 100644
--- a/src/Acheve.TestHost/HttpResponseMessageExtensions.cs
+++ b/src/Acheve.TestHost/HttpResponseMessageExtensions.cs
@@ -22,6 +22,12 @@ public static async Task IsSuccessStatusCodeOrThrow(this HttpResponseMessage res
throw new Exception($"Response status does not indicate success: {response.StatusCode:D} ({response.StatusCode}); \r\n{content}");
}
+ ///
+ /// Deserialize HttpResponseMessage to T Class
+ ///
+ /// Class
+ /// The httpResponseMessage instance
+ ///
public static async Task ReadContentAsAsync(this HttpResponseMessage responseMessage)
{
var json = await responseMessage.Content.ReadAsStringAsync();
diff --git a/src/Acheve.TestHost/Routing/Tokenizers/ComplexParameterActionTokenizer.cs b/src/Acheve.TestHost/Routing/Tokenizers/ComplexParameterActionTokenizer.cs
index 683e365..2612011 100644
--- a/src/Acheve.TestHost/Routing/Tokenizers/ComplexParameterActionTokenizer.cs
+++ b/src/Acheve.TestHost/Routing/Tokenizers/ComplexParameterActionTokenizer.cs
@@ -18,7 +18,6 @@ public void AddTokens(TestServerAction action, TestServerTokenColle
var type = parameters[i].ParameterType;
var instance = action.ArgumentValues.Any(x => x.Key == i) ? action.ArgumentValues[i].Instance : null;
-
if (instance != null && !type.IsPrimitiveType())
{
if (!IgnoreBind(parameters[i]))
diff --git a/src/Acheve.TestHost/Routing/Tokenizers/PrimitiveParameterActionTokenizer.cs b/src/Acheve.TestHost/Routing/Tokenizers/PrimitiveParameterActionTokenizer.cs
index 1160820..962a9ac 100644
--- a/src/Acheve.TestHost/Routing/Tokenizers/PrimitiveParameterActionTokenizer.cs
+++ b/src/Acheve.TestHost/Routing/Tokenizers/PrimitiveParameterActionTokenizer.cs
@@ -16,10 +16,12 @@ public void AddTokens(TestServerAction action, TestServerTokenColle
for (var i = 0; i < parameters.Length; i++)
{
+ var tokenName = parameters[i].Name.ToLowerInvariant();
+
if (parameters[i].ParameterType.IsPrimitiveType()
&& !IgnoreHeader(parameters[i]))
{
- var tokenName = parameters[i].Name.ToLowerInvariant();
+
var tokenValue = action.ArgumentValues.Any(x => x.Key == i) ? action.ArgumentValues[i].Instance : null;
if (tokenValue != null)
@@ -28,7 +30,8 @@ public void AddTokens(TestServerAction action, TestServerTokenColle
}
}
else if (parameters[i].ParameterType.IsArray
- && IsPrimitiveType(parameters[i].ParameterType.GetElementType()))
+ && IsPrimitiveType(parameters[i].ParameterType.GetElementType())
+ && !IgnoreHeader(parameters[i]))
{
var arrayValues = (Array)action.ArgumentValues[i].Instance;
@@ -36,7 +39,6 @@ public void AddTokens(TestServerAction action, TestServerTokenColle
&& arrayValues.Length != 0
)
{
- var tokenName = parameters[i].Name.ToLowerInvariant();
var tokenValue = GetTokenValue(arrayValues, tokenName);
tokens.AddToken(tokenName, tokenValue, isConventional: false);
}
diff --git a/src/Acheve.TestHost/Routing/Tokenizers/TypeExtensions.cs b/src/Acheve.TestHost/Routing/Tokenizers/TypeExtensions.cs
index 1813f54..e45adf5 100644
--- a/src/Acheve.TestHost/Routing/Tokenizers/TypeExtensions.cs
+++ b/src/Acheve.TestHost/Routing/Tokenizers/TypeExtensions.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Acheve.TestHost.Routing.Tokenizers
+namespace System
{
internal static class TypeExtensions
{