static private GetCacheControlLength ( string input, int startIndex, |
||
input | string | |
startIndex | int | |
storeValue | ||
parsedValue | ||
리턴 | int |
protected override int GetParsedValueLength(string value, int startIndex, object?storeValue, out object?parsedValue) { CacheControlHeaderValue?temp = null; bool isInvalidValue = true; if (storeValue is List <object> list) { foreach (object item in list) { if (item is not HttpHeaders.InvalidValue) { isInvalidValue = false; temp = item as CacheControlHeaderValue; break; } } } else { if (storeValue is not HttpHeaders.InvalidValue) { isInvalidValue = false; temp = storeValue as CacheControlHeaderValue; } } Debug.Assert(isInvalidValue || storeValue == null || temp != null, "'storeValue' is not of type CacheControlHeaderValue"); int resultLength = CacheControlHeaderValue.GetCacheControlLength(value, startIndex, temp, out temp); parsedValue = temp; return(resultLength); }
protected override int GetParsedValueLength(string value, int startIndex, object storeValue, out object parsedValue) { CacheControlHeaderValue temp = storeValue as CacheControlHeaderValue; Debug.Assert(storeValue == null || temp != null, "'storeValue' is not of type CacheControlHeaderValue"); int resultLength = CacheControlHeaderValue.GetCacheControlLength(value, startIndex, temp, out temp); parsedValue = temp; return(resultLength); }