예제 #1
0
 public FilteringExtensionPoint(
     IProvideAccessToMatchCreationExtensions <Item, AttributeType, IMatchA <Item> > filter_extensions,
     IEnumerable <Item> items)
 {
     this.filter_extensions = filter_extensions;
     this.items             = items;
 }
예제 #2
0
        public static ReturnType between <ItemToMatch, AttributeType, ReturnType>(this IProvideAccessToMatchCreationExtensions <ItemToMatch, AttributeType, ReturnType> extension_point, AttributeType start, AttributeType end)
            where AttributeType : IComparable <AttributeType>
        {
            var match = new EqualAnyMatch <AttributeType>(start).or(new GreaterThan <AttributeType>(start)).and(
                new EqualAnyMatch <AttributeType>(end).or(new LessThan <AttributeType>(end)));

            return(extension_point.for_value_matcher(match));
        }
예제 #3
0
 public NegatingMatchCreationExtensionPoint(IProvideAccessToMatchCreationExtensions <ItemToMatch, AttributeType, IMatchA <ItemToMatch> > original)
 {
     this.original = original;
 }
예제 #4
0
 public NegatingFilteringExtensionPoint(
     IProvideAccessToMatchCreationExtensions <Item, AttributeType, IEnumerable <Item> > original)
 {
     this.original = original;
 }
예제 #5
0
 public static ReturnType greater_than <ItemToMatch, ReturnType>(
     this IProvideAccessToMatchCreationExtensions <ItemToMatch, DateTime, ReturnType> extension_point, int year)
 {
     return(extension_point.for_value_matcher(
                Match <DateTime> .with_attribute(x => x.Year).greater_than(year)));
 }
예제 #6
0
 public static ReturnType equal_to <ItemToMatch, AttributeType, ReturnType>(this IProvideAccessToMatchCreationExtensions <ItemToMatch, AttributeType, ReturnType> extension_point, AttributeType value)
 {
     return(extension_point.equal_to_any(value));
 }
예제 #7
0
 public static ReturnType less_than <ItemToMatch, AttributeType, ReturnType>(this IProvideAccessToMatchCreationExtensions <ItemToMatch, AttributeType, ReturnType> extension_point, AttributeType value)
     where AttributeType : IComparable <AttributeType>
 {
     return(extension_point.for_value_matcher(new LessThan <AttributeType>(value)));
 }
예제 #8
0
 public static ReturnType falls_in <ItemToMatch, AttributeType, ReturnType>(this IProvideAccessToMatchCreationExtensions <ItemToMatch, AttributeType, ReturnType> extension_point, IContainValues <AttributeType> range)
     where AttributeType : IComparable <AttributeType>
 {
     return(extension_point.for_value_matcher(new FallsIn <AttributeType>(range)));
 }
예제 #9
0
 public static ReturnType for_value_matcher <ItemToMatch, AttributeType, ReturnType>(this IProvideAccessToMatchCreationExtensions <ItemToMatch, AttributeType, ReturnType> extension_point, IMatchA <AttributeType> value_condition)
 {
     return(extension_point.create_dsl_result(value_condition));
 }
예제 #10
0
 public static ReturnType equal_to_any <ItemToMatch, AttributeType, ReturnType>(this IProvideAccessToMatchCreationExtensions <ItemToMatch, AttributeType, ReturnType> extension_point, params AttributeType[] values)
 {
     return(extension_point.for_value_matcher(new EqualAnyMatch <AttributeType>(values)));
 }