This commit is contained in:
2026-06-15 18:18:16 +08:00
parent 97c9fba14e
commit 2b9f134e5f
4164 changed files with 386922 additions and 79 deletions

View File

@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Best.HTTP.Shared.Extensions
{
/// <summary>
/// Base class for specialized parsers
/// </summary>
public class KeyValuePairList
{
public List<HeaderValue> Values { get; protected set; }
public bool TryGet(string valueKeyName, out HeaderValue @param)
{
@param = null;
for (int i = 0; i < Values.Count; ++i)
if (string.CompareOrdinal(Values[i].Key, valueKeyName) == 0)
{
@param = Values[i];
return true;
}
return false;
}
}
}