public IQueryable GetQueryable(IEverything everything) { return(everything .Search() .Name .Contains(this.Pattern)); }
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); }
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()}")); }
public static IEverything Not(this IEverything everything) { everything.SearchText += "!"; return(everything); }
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()}")); }
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)); }
private static IEverything Macro(IEverything everything, string tag, string search) { everything.SearchText += tag + LogicSearch.QuoteIfNeeded(search); return(everything); }
public IQueryable GetQueryable(IEverything everything) { return(everything.Search() .Size .Equal(this.PredefinedSize)); }
public static IEverything Video(this IEverything everything, string search = null) { return(Macro(everything, "video:", search)); }
public static IEverything Title(this IEverything everything, string title = null) { return(Search(everything, "title:", title)); }
public static IEverything Track(this IEverything everything, int track = -1) { return(Search(everything, "track:", track >= 0 ? $"{track}" : String.Empty)); }
public static IEverything Genre(this IEverything everything, string genre = null) { return(Search(everything, "genre:", genre)); }
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)); }
public static IEverything Is(this IEverything everything, string value) { everything.SearchText += QuoteIfNeeded(value); return(everything); }
public static IEverything Exe(this IEverything everything, string search = null) { return(Macro(everything, "exe:", search)); }
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")); }
public static IEverything Zip(this IEverything everything, string search = null) { return(Macro(everything, "zip:", search)); }
public static IEverything Album(this IEverything everything, string album = null) { return(Search(everything, "album:", album)); }
public static IEverything Picture(this IEverything everything, string search = null) { return(Macro(everything, "pic:", search)); }
public static IEverything Is(this IEverything everything, object value) { everything.SearchText += QuoteIfNeeded(value.ToString()); return(everything); }
public static IEverything Document(this IEverything everything, string search = null) { return(Macro(everything, "doc:", search)); }
public static IEverything GreaterThan(this IEverything everything, int value) { everything.SearchText += $">{value}"; return(everything); }
public static IEverything Audio(this IEverything everything, string search = null) { return(Macro(everything, "audio:", search)); }
public static IEverything LessOrEqualThan(this IEverything everything, int value) { everything.SearchText += $"<={value}"; return(everything); }