Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static ObjectValueDictionary ObjectToDictionaryUncached(object value)
        {
            ObjectValueDictionary routeValueDictionary = new ObjectValueDictionary();

            if (value != null)
            {
                PropertyHelper[] properties = PropertyHelper.GetProperties(value);
                for (int i = 0; i < properties.Length; i++)
                {
                    PropertyHelper propertyHelper = properties[i];
                    routeValueDictionary.Add(propertyHelper.Name, propertyHelper.GetValue(value));
                }
            }
            return(routeValueDictionary);
        }