System.Net.Http.Tests.HttpHeaderValueCollectionTest.MockHeaderParser.TryParseValue C# (CSharp) Method

TryParseValue() public method

public TryParseValue ( string value, object storeValue, int &index, object &parsedValue ) : bool
value string
storeValue object
index int
parsedValue object
return bool
            public override bool TryParseValue(string value, object storeValue, ref int index, out object parsedValue)
            {
                parsedValue = null;
                if (value == null)
                {
                    return true;
                }

                index = value.Length;

                // Just return the raw string (as string or Uri depending on the value type)
                parsedValue = (valueType == typeof(Uri) ? (object)new Uri(value) : value);
                return true;
            }
        }
HttpHeaderValueCollectionTest.MockHeaderParser