public override IEnumerable <string> GetWords() { //_webDriver.Navigate().GoToUrl(URI.ToString()); _webDriver.Url = URI.ToString(); List <string> words = new List <string>(); SearchTags.ForEach(t => { var elements = _webDriver.FindElements(By.TagName(t)); foreach (IWebElement element in elements) { // Going to look at content attributes, value attributes and inner text for words. var analyzeThis = string.Concat(element.GetAttribute("content"), " ", element.GetAttribute("value"), " ", element.Text); AddWords(analyzeThis, words); } // Special case for title tag if (string.Equals("title", t, StringComparison.OrdinalIgnoreCase)) { AddWords(_webDriver.Title, words); } }); ProgressIndicator.Reset(); ProgressIndicator.Maximum = words.Count(); foreach (string word in words) { ProgressIndicator.Increment(1); yield return(word); } }
void OnEnable() { SearchTags myTarget = (SearchTags)target; // Set the choice index to the previously selected index _choiceIndex = Array.IndexOf(_TagStringList, myTarget.TagItem); }
public override BuildStep Clone() { var clone = new OutputEnumerationBuildStep(); if (template != null) { clone.Template = template.Clone(); } clone.SearchTags = SearchTags.ToList(); return(clone); }
private void ReadConfigFromFile() { string[] lines = System.IO.File.ReadAllLines(@"userProfile.cfg"); Username = lines[0]; Longi = lines[1]; Lati = lines[2]; for (int i = 3; i < lines.Length; i++) { var line = lines[i].Split(':'); SearchTags.Add(new Tag(line[0], line[1])); } }
public async Task <PagedResultDto <TagDto> > SearchForTagsAsync(SearchTags parameters) { IQueryable <Tag> query = _context.Tags .OrderBy(x => x.Name) .ThenBy(x => x.Id); if (!string.IsNullOrWhiteSpace(parameters.Name)) { query = query.Where(x => x.Name.Contains(parameters.Name)); } PagedResultDto <TagDto> result = await ToPagedResult(query, parameters.Page, ToDto); return(result); }
public override void OnInspectorGUI() { mystyle = new GUIStyle(); mystyle.normal.textColor = new Color(0.75f, 0.5f, 1f, 1.0f); mystyle.fontSize = 18; mystyle.fixedHeight = 20; mystyle.normal.background = MakeTex(600, 1, new Color(0.1f, 0.1f, 0.1f, 1.0f)); SearchTags myTarget = (SearchTags)target; _choiceIndex = EditorGUILayout.Popup("TagItem", _choiceIndex, _TagStringList, mystyle); if (_choiceIndex < 0) { _choiceIndex = 0; } myTarget.TagItem = _TagStringList[_choiceIndex]; }
public IEnumerable <Book> FindByTag(SearchTags tag, string value) { switch (tag) { case SearchTags.Name: { return(this._storage.Where((b) => b.Name == value)); } case SearchTags.Author: { return(this._storage.Where((b) => b.Author == value)); } case SearchTags.Cost: { return(this._storage.Where((b) => b.Cost == Convert.ToDecimal(value))); } case SearchTags.ISBN: { return(this._storage.Where((b) => b.ISBN == value)); } case SearchTags.Publisher: { return(this._storage.Where((b) => b.Publisher == value)); } case SearchTags.PublishingYear: { return(this._storage.Where((b) => b.PublicationYear == Convert.ToInt32(value))); } default: { throw new ArgumentException(nameof(tag)); } } }
public IEnumerable <Book> SortByTag(SearchTags tag) { switch (tag) { case SearchTags.Name: { return(this._storage.OrderBy((b) => b.Name)); } case SearchTags.Author: { return(this._storage.OrderBy((b) => b.Author)); } case SearchTags.Cost: { return(this._storage.OrderBy((b) => b.Cost)); } case SearchTags.ISBN: { return(this._storage.OrderBy((b) => b.ISBN)); } case SearchTags.Publisher: { return(this._storage.OrderBy((b) => b.Publisher)); } case SearchTags.PublishingYear: { return(this._storage.OrderBy((b) => b.PublicationYear)); } default: { throw new ArgumentException(nameof(tag)); } } }
public async Task <PagedResultDto <TagDto> > SearchForTags([FromBody] SearchTags parameters) { return(await _tagService.SearchForTagsAsync(parameters)); }
void Awake() { s_instance = this; StartCoroutine(LoadSearchTagsAsync()); }
public int Update(SearchTags model) { return(Db.Context.Update(model)); }
public IEnumerable <Book> SortBooksByTag(SearchTags tag) { return(this._storage.SortByTag(tag)); }
public IEnumerable <Book> FindBooksByTag(SearchTags tag, string value) { return(this._storage.FindByTag(tag, value)); }