public IQueryable GetQueryable(IEverything everything)
 {
     return(everything
            .Search()
            .Name
            .Contains(this.Pattern));
 }
Exemple #2
0
        public static IEverything Between(this IEverything everything, int min, int max, Enum unit)
        {
            string u = unit.ToString().ToLower();

            everything.SearchText += $"{min}{u}-{max}{u}";

            return(everything);
        }
 public MainViewModel()
 {
     everything      = new Everything();
     QueryCategories =
         new ObservableCollection <IQueryViewModel> {
         new NameViewModel(), new DateViewModel(), new SizeViewModel()
     };
     Results = new ObservableCollection <ISearchResult>();
     BindingOperations.EnableCollectionSynchronization(Results, collectionLock);
     SearchCommand = new RelayCommand(SearchExecute);
 }
Exemple #4
0
        public IQueryable GetQueryable(IEverything everything)
        {
            if (this.From.HasValue && this.To.HasValue)
            {
                return(everything
                       .Search()
                       .ModificationDate
                       .Between(this.From.Value, this.To.Value));
            }
            else if (this.From.HasValue)
            {
                return(everything
                       .Search()
                       .ModificationDate
                       .Equal(this.From.Value));
            }

            return(null);
        }
 public static IEverything This(this IEverything everything, Times times)
 {
     return(Date(everything, $"this{times.ToString().ToLower()}"));
 }
Exemple #6
0
        public static IEverything Not(this IEverything everything)
        {
            everything.SearchText += "!";

            return(everything);
        }
Exemple #7
0
        public static IEverything Between(this IEverything everything, int min, int max, string unit = "")
        {
            everything.SearchText += $"{min}{unit}-{max}{unit}";

            return(everything);
        }
 public static IEverything This(this IEverything everything, Dates date)
 {
     return(Date(everything, $"this{date.ToString().ToLower()}"));
 }
Exemple #9
0
        public static IEverything And(this IEverything everything)
        {
            everything.SearchText += " ";

            return(everything);
        }
 public static IEverything Next(this IEverything everything, Times times, int num = 0)
 {
     return(Date(everything, "next", times, num, string.Empty));
 }
Exemple #11
0
        private static IEverything Macro(IEverything everything, string tag, string search)
        {
            everything.SearchText += tag + LogicSearch.QuoteIfNeeded(search);

            return(everything);
        }
Exemple #12
0
 public IQueryable GetQueryable(IEverything everything)
 {
     return(everything.Search()
            .Size
            .Equal(this.PredefinedSize));
 }
Exemple #13
0
 public static IEverything Video(this IEverything everything, string search = null)
 {
     return(Macro(everything, "video:", search));
 }
Exemple #14
0
 public static IEverything Title(this IEverything everything, string title = null)
 {
     return(Search(everything, "title:", title));
 }
Exemple #15
0
 public static IEverything Track(this IEverything everything, int track = -1)
 {
     return(Search(everything, "track:", track >= 0 ? $"{track}" : String.Empty));
 }
Exemple #16
0
 public static IEverything Genre(this IEverything everything, string genre = null)
 {
     return(Search(everything, "genre:", genre));
 }
Exemple #17
0
 public static IEverything Artist(this IEverything everything, string artist = null)
 {
     return(Search(everything, "artist:", artist));
 }
 public static IEverything Last(this IEverything everything, Times times, int num = 0)
 {
     return(Date(everything, "last", times, num, String.Empty));
 }
Exemple #19
0
        public static IEverything Is(this IEverything everything, string value)
        {
            everything.SearchText += QuoteIfNeeded(value);

            return(everything);
        }
Exemple #20
0
 public static IEverything Exe(this IEverything everything, string search = null)
 {
     return(Macro(everything, "exe:", search));
 }
Exemple #21
0
 public static IEverything Comment(this IEverything everything, string comment = null)
 {
     return(Search(everything, "comment:", comment));
 }
 public static IEverything Next(this IEverything everything, Dates date, int num = 0)
 {
     return(Date(everything, "next", date, num, "s"));
 }
Exemple #23
0
 public static IEverything Zip(this IEverything everything, string search = null)
 {
     return(Macro(everything, "zip:", search));
 }
Exemple #24
0
 public static IEverything Album(this IEverything everything, string album = null)
 {
     return(Search(everything, "album:", album));
 }
Exemple #25
0
 public static IEverything Picture(this IEverything everything, string search = null)
 {
     return(Macro(everything, "pic:", search));
 }
Exemple #26
0
        public static IEverything Is(this IEverything everything, object value)
        {
            everything.SearchText += QuoteIfNeeded(value.ToString());

            return(everything);
        }
Exemple #27
0
 public static IEverything Document(this IEverything everything, string search = null)
 {
     return(Macro(everything, "doc:", search));
 }
Exemple #28
0
        public static IEverything GreaterThan(this IEverything everything, int value)
        {
            everything.SearchText += $">{value}";

            return(everything);
        }
Exemple #29
0
 public static IEverything Audio(this IEverything everything, string search = null)
 {
     return(Macro(everything, "audio:", search));
 }
Exemple #30
0
        public static IEverything LessOrEqualThan(this IEverything everything, int value)
        {
            everything.SearchText += $"<={value}";

            return(everything);
        }