Beispiel #1
0
        internal string[] GetContentProperties()
        {
            var result = OrderedProperties
                         .Where(r => r.GetCustomAttribute <ColumnAttribute>().ColumnType == ColumnTypeEnum.Content)
                         .Select(r => ToLowerCamelCase(r.Name))
                         .ToList();

            if (this is WrapperWithDoc && SearchSettings.CanSearchByContent(GetType()))
            {
                result.Add("document.attachment.content");
            }

            foreach (var join in GetJoins())
            {
                var joinType = join.Value.Name;
                var joinAttr = join.Value.GetCustomAttribute <JoinAttribute>().JoinType;
                result.AddRange(join.Key.GetContentProperties()
                                .Select(r => (joinAttr == JoinTypeEnum.Sub ? joinAttr + ":" : "") + ToLowerCamelCase(joinType) + "." + r));
            }

            return(result.ToArray());
        }