Binda.TreeViewBindaStrategy.GetChildItems C# (CSharp) Method

GetChildItems() private method

private GetChildItems ( object source, string propertyName ) : IEnumerable
source object
propertyName string
return IEnumerable
        IEnumerable GetChildItems(object source, string propertyName)
        {
            var sourceProperty = source.GetType().GetProperty(propertyName);
            if (sourceProperty == null) return Enumerable.Empty<object>();
            var values = sourceProperty.GetValue(source, null) as IEnumerable;
            return values;
        }