private static ValueProviderResult GetResultFromCollection(string key, CookieValueProvider valueProvider, bool useValidatedCollection) { HttpCookieCollection collection = (useValidatedCollection) ? valueProvider._validatedCollection : valueProvider._unvalidatedCollection; string value = collection[key].Value; return(new ValueProviderResult(value, value, valueProvider._culture)); }
private static ValueProviderResult GetResultFromCollection(string key, CookieValueProvider valueProvider, bool useValidatedCollection) { HttpCookieCollection collection = (useValidatedCollection) ? valueProvider._validatedCollection : valueProvider._unvalidatedCollection; string value = collection[key].Value; return new ValueProviderResult(value, value, valueProvider._culture); }
public ValueProviderResultPlaceholder(string key, CookieValueProvider valueProvider) { _validatedResultAccessor = () => GetResultFromCollection(key, valueProvider, useValidatedCollection: true); _unvalidatedResultAccessor = () => GetResultFromCollection(key, valueProvider, useValidatedCollection: false); }
public ValueProviderResultPlaceholder(string key, CookieValueProvider valueProvider) { _validatedResultAccessor = () => GetResultFromCollection(key, valueProvider, useValidatedCollection: true); _unvalidatedResultAccessor = () => GetResultFromCollection(key, valueProvider, useValidatedCollection: false); }