Пример #1
0
 public PropertySortRule(
     DelegateOrExpression <PropertyGetter <TProperty> > getProperty,
     IComparer <TProperty> comparer
     )
 {
     if (getProperty == null)
     {
         throw new ArgumentNullException("getProperty");
     }
     GetProperty     = getProperty;
     Comparer        = comparer;
     RuntimeComparer = Comparer ?? Comparer <TProperty> .Default;
     _GetProperty    = getProperty.Compile();
 }
Пример #2
0
            public TagSortRule(
                DelegateOrExpression <TagGetter> getTags,
                params TagOrdering[] orderings
                )
            {
                if (getTags == null)
                {
                    throw new ArgumentNullException("getTags");
                }

                GetTags  = getTags;
                _GetTags = GetTags.Compile();

                foreach (var o in orderings)
                {
                    Orderings.Add(o);
                }
            }