Exemple #1
0
        public void ExposeEverything()
        {
            var properties = DomainType.GetProperties()
                             .Where(x => x.CanRead && x.CanWrite)
                             .Where(x => x.DeclaringType.Assembly == DomainType.Assembly)
                             .ToArray();

            foreach (var p in properties)
            {
                if (p.PropertyType == typeof(Guid?) && p.Name.EndsWith("Id") && properties.Any(x => x.Name ==
                                                                                               p.Name.TrimEnd(2)))
                {
                    continue;
                }

                Fields.Add(new ExposedPropertyInfo(p));
            }
        }