You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
696 B
27 lines
696 B
using System; |
|
using System.Collections.Generic; |
|
using System.Linq; |
|
using System.Text; |
|
|
|
namespace BestHTTP.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; |
|
} |
|
} |
|
} |