Beispiel #1
0
 public void Complete(IEqualityComparerResolver resolver, PropertyInfo?pi)
 {
     Properties = MemberEntryFactory.GenerateList <T>(MemberOptions.Properties | MemberOptions.Typed | MemberOptions.Getter)
                  .ToDictionary(a => a.Name, a => new PropertyComparer <T>(
                                    propertyInfo: (PropertyInfo)a.MemberInfo,
                                    getter: a.Getter !,
                                    comparer: resolver.GetEqualityComparer(((PropertyInfo)a.MemberInfo).PropertyType, (PropertyInfo)a.MemberInfo)));
 }
Beispiel #2
0
        public void Complete(IEqualityComparerResolver resolver, PropertyInfo?pi)
        {
            Properties = MemberEntryFactory.GenerateList <T>(MemberOptions.Properties | MemberOptions.Typed | MemberOptions.Getter)
                         .Where(p => !((PropertyInfo)p.MemberInfo).HasAttribute <HiddenPropertyAttribute>())
                         .ToDictionary(a => a.Name, a => new PropertyComparer <T>(
                                           propertyInfo: (PropertyInfo)a.MemberInfo, a.Getter !,
                                           comparer: resolver.GetEqualityComparer(((PropertyInfo)a.MemberInfo).PropertyType, (PropertyInfo)a.MemberInfo)));

            Mixins = !typeof(Entity).IsAssignableFrom(typeof(T)) ? null :
                     MixinDeclarations.GetMixinDeclarations(typeof(T)).ToDictionary(t => t, t => resolver.GetEqualityComparer(t, null));
        }
Beispiel #3
0
 public void Complete(IEqualityComparerResolver resolver, PropertyInfo?pi)
 {
     ElementComparer = (IEqualityComparer <T>)resolver.GetEqualityComparer(typeof(T), pi);
 }
Beispiel #4
0
 public UnsortedMListEqualityComparer(IEqualityComparerResolver resolver, PropertyInfo pi)
 {
     ElementComparer = (IEqualityComparer <T>)resolver.GetEqualityComparer(typeof(T), pi);
 }