예제 #1
0
        public TypeDocConfig <T> WithPropertyDescription(Expression <Func <T, object> > selector, string description)
        {
            var name = Reflekt <T> .PropertyName(selector);

            properties.Add(name, description);
            return(this);
        }
예제 #2
0
        public object GetRedirectedValue(object originalDataTypeObject)
        {
            if (originalDataTypeObject == null)
            {
                return(null);
            }
            Type t = originalDataTypeObject.GetType();

            if (_isMultiple)
            {
                return(originalDataTypeObject); //the data type itself implements IEnumerable<> so we can assign it to the IEnumerable<> property directly.
            }
            else
            {
                var prop = t.GetProperty(Reflekt <IPickedItem <DocumentTypeBase> > .PropertyName(x => x.PickedItem));
                return(prop.GetValue(originalDataTypeObject));
            }
        }
예제 #3
0
 public TypeDocConfig <T> ExcludingProperty(Expression <Func <T, object> > selector)
 {
     excludedMembers.Add(Reflekt <T> .PropertyName(selector));
     return(this);
 }