internal override object DoGetProperty(System.Reflection.MethodInfo methodInfo, string propertyName)
        {
            object value;

            ValueMap.TryGetValue(propertyName, out value);
            return(value);
        }
Exemple #2
0
        internal object DoGetProperty(System.Reflection.MethodInfo methodInfo, string propertyName)
        {
            TValue value;

            if (ValueMap.TryGetValue(propertyName, out value))
            {
                return((methodInfo.ReturnType.Equals(typeof(string)))
                    ?value:CommonExtension.ToObject(value, methodInfo.ReturnType));
            }
            return(value);
        }
 public static HeaderValue Of(int nr) => ValueMap.TryGetValue(nr, out HeaderValue v) ? v : Unknown;