Regextra.Template.GetPropertyValue C# (CSharp) Méthode

GetPropertyValue() private static méthode

private static GetPropertyValue ( object item, string property ) : object
item object
property string
Résultat object
        private static object GetPropertyValue(object item, string property)
        {
            object result;
            var dictionary = item as IDictionary;

            if (dictionary != null)
            {
                result = dictionary[property];
            }
            else
            {
                result = ObjectAccessor.Create(item)[property];
            }

            return result;
        }