public SearchService(ICurrentMarket currentMarket, ICurrencyService currencyService, UrlResolver urlResolver, SearchFacade search, LanguageResolver languageResolver, IContentLoader contentLoader, LocalizationService localizationService) { _search = search; _currentMarket = currentMarket; _currencyService = currencyService; _urlResolver = urlResolver; _languageResolver = languageResolver; _contentLoader = contentLoader; _localizationService = localizationService; }
public SearchService(ICurrentMarket currentMarket, ICurrencyService currencyService, UrlResolver urlResolver, SearchFacade search, Func <CultureInfo> preferredCulture, IContentLoader contentLoader, LocalizationService localizationService) { _search = search; _currentMarket = currentMarket; _currencyService = currencyService; _urlResolver = urlResolver; _preferredCulture = preferredCulture(); _contentLoader = contentLoader; _localizationService = localizationService; }
/// <summary> /// Replaces author name in document using custom ReplaceHandler /// </summary> public static void ReplaceAuthorName(string filePath) { try { //ExStart:ReplaceAuthorName // initialize custom handler, send output path using constructor IReplaceHandler <MetadataProperty> replaceHandler = new AuthorReplaceHandler(Common.MapDestinationFilePath(filePath)); // replace author int affectedPropertiesCount = SearchFacade.ReplaceInDocument(Common.MapSourceFilePath(filePath), replaceHandler); //ExEnd:ReplaceAuthorName } catch (Exception exp) { Console.WriteLine("Exception occurred: " + exp.Message); } }
/// <summary> /// Replaces author name in document using custom ReplaceHandler /// </summary> public static void ReplaceMetadataProperties(string filePath) { try { //ExStart:ReplaceMetadataProperties // replace 'author' value SearchFacade.ReplaceInDocument(Common.MapSourceFilePath(filePath), "Author", "Jack London", SearchCondition.Matches, Common.MapDestinationFilePath(filePath)); // replace all properties contained 'co' to 'some value' SearchFacade.ReplaceInDocument(Common.MapSourceFilePath(filePath), "co", "some value", SearchCondition.Contains, Common.MapDestinationFilePath(filePath)); //ExEnd:ReplaceMetadataProperties } catch (Exception exp) { Console.WriteLine("Exception occurred: " + exp.Message); } }
public void TestInitialize() { //*firefoxchrome //*iexplore //*opera //*safari //*googlechrome Selenium = new SeleniumDecorator("localhost", 4444, @"*iexplore", "http://bookean-dev/"); //_selenium = new DefaultSelenium("localhost", 4444, @"*firefoxJ:\Program Files\Mozilla Firefox\firefox.exe", "http://bookean-dev/"); Selenium.Start(); Selenium.SetTimeout("50000"); ProductListFacade = new ProductListFacade(Selenium); UserFacade = new UserFacade(Selenium); CartFacade = new CartFacade(Selenium); OrderFacade = new OrderFacade(Selenium); SearchFacade = new SearchFacade(Selenium); _verificationErrors = new StringBuilder(); }
public override void ViewDidLoad() { base.ViewDidLoad(); _searchFacade = new SearchFacade(); _timer = new Timer(OnTimer); _userTableSource = new FollowTableViewSource(_searchFacade.UserFriendPresenter, usersTable); _userTableSource.ScrolledToBottom += GetItems; _userTableSource.CellAction += CellAction; usersTable.Source = _userTableSource; usersTable.LayoutMargins = UIEdgeInsets.Zero; usersTable.RegisterClassForCellReuse(typeof(FollowViewCell), nameof(FollowViewCell)); usersTable.RegisterNibForCellReuse(UINib.FromName(nameof(FollowViewCell), NSBundle.MainBundle), nameof(FollowViewCell)); usersTable.RegisterClassForCellReuse(typeof(LoaderCell), nameof(LoaderCell)); var _tagsSource = new TagsTableViewSource(_searchFacade.TagsPresenter); _tagsSource.CellAction += CellAction; tagsTable.Source = _tagsSource; tagsTable.LayoutMargins = UIEdgeInsets.Zero; tagsTable.RegisterClassForCellReuse(typeof(TagTableViewCell), nameof(TagTableViewCell)); tagsTable.RegisterNibForCellReuse(UINib.FromName(nameof(TagTableViewCell), NSBundle.MainBundle), nameof(TagTableViewCell)); tagsTable.RowHeight = 65f; _searchFacade.UserFriendPresenter.SourceChanged += UserFriendPresenterSourceChanged; _searchFacade.TagsPresenter.SourceChanged += TagsPresenterSourceChanged; searchTextField.BecomeFirstResponder(); searchTextField.Font = Helpers.Constants.Regular14; noTagsLabel.Font = Helpers.Constants.Light27; noTagsLabel.Text = AppSettings.LocalizationManager.GetText(LocalizationKeys.EmptyQuery); searchTextField.ShouldReturn += ShouldReturn; searchTextField.EditingChanged += EditingChanged; tagsButton.TouchDown += TagsButtonTap; peopleButton.TouchDown += PeopleButtonTap; SwitchSearchType(); SetBackButton(); }
/// <summary> /// Searches metadata in document /// </summary> public static void SearchMetadata(string filePath, string propertyName, SearchCondition searchCondition) { try { //ExStart:DocumentSearchAPI filePath = Common.MapSourceFilePath(filePath); MetadataPropertyCollection properties = SearchFacade.ScanDocument(filePath, propertyName, searchCondition); foreach (MetadataProperty property in properties) { Console.WriteLine("{0} : {1}", property.Name, property.Value); } //ExEnd:DocumentSearchAPI } catch (Exception exp) { Console.WriteLine("Exception occurred: " + exp.Message); } }
public SearchService(ICurrentMarket currentMarket, ICurrencyService currencyService, UrlResolver urlResolver, SearchFacade search, LanguageResolver languageResolver, IContentLoader contentLoader, LocalizationService localizationService, IPromotionEngine promotionEngine, ReferenceConverter referenceConverter) { _search = search; _currentMarket = currentMarket; _currencyService = currencyService; _urlResolver = urlResolver; _languageResolver = languageResolver; _contentLoader = contentLoader; _localizationService = localizationService; _promotionEngine = promotionEngine; _referenceConverter = referenceConverter; }
/// <summary> /// Searches metadata in image /// </summary> public static void SearchMetadata(string filePath, string propertyName, SearchCondition searchCondition) { try { //ExStart:ImageSearchAPI filePath = Common.MapSourceFilePath(filePath); TiffTag[] resolutionTags = SearchFacade.ScanExifTags(filePath, new Regex("^(XResolution|YResolution)$")); foreach (TiffTag resolutionTag in resolutionTags) { Console.WriteLine("{0} - {1}", resolutionTag.DefinedTag, ((TiffRationalTag)resolutionTag).TagValue[0].Value); } //ExEnd:ImageSearchAPI } catch (Exception exp) { Console.WriteLine("Exception occurred: " + exp.Message); } }
public override void ViewDidLoad() { base.ViewDidLoad(); CreateView(); _searchFacade = new SearchFacade(); _timer = new Timer(OnTimer); SetupTables(); _searchFacade.UserFriendPresenter.SourceChanged += UserFriendPresenterSourceChanged; _searchFacade.TagsPresenter.SourceChanged += TagsPresenterSourceChanged; searchTextField.EditingChanged += EditingChanged; tagsButton.TouchDown += TagsButtonTap; peopleButton.TouchDown += PeopleButtonTap; SwitchSearchType(false); SetBackButton(); }
/// <summary> /// Searches metadata in image /// </summary> public static void SearchMetadata(string filePath, string propertyName, SearchCondition searchCondition) { try { //ExStart:ImageSearchAPI filePath = Common.MapSourceFilePath(filePath); // looking the software ExifProperty[] properties = SearchFacade.ScanExif(filePath, propertyName, searchCondition); foreach (ExifProperty property in properties) { Console.WriteLine("{0} : {1}", property.Name, property.ToString()); } //ExEnd:ImageSearchAPI } catch (Exception exp) { Console.WriteLine("Exception occurred: " + exp.Message); } }
public override void ViewDidLoad() { base.ViewDidLoad(); CreateView(); var client = AppDelegate.MainChain == KnownChains.Steem ? AppDelegate.SteemClient : AppDelegate.GolosClient; _searchFacade = new SearchFacade(); _searchFacade.SetClient(client); _timer = new Timer(OnTimer); SetupTables(); _searchFacade.UserFriendPresenter.SourceChanged += UserFriendPresenterSourceChanged; _searchFacade.TagsPresenter.SourceChanged += TagsPresenterSourceChanged; searchTextField.EditingChanged += EditingChanged; tagsButton.TouchDown += TagsButtonTap; peopleButton.TouchDown += PeopleButtonTap; SwitchSearchType(false); SetBackButton(); }
public void AdvSearchPublisherTest() { SearchFacade.AdvSearch("Неприхотливый сад", "", "Кладезь-Букс", "", "", WaitingType.PageLoad); Assert.IsTrue(Selenium.IsTextPresent("Неприхотливый сад")); Assert.IsTrue(Selenium.IsTextPresent("Кладезь-Букс")); }
public void AdvSearchFitonPlusTest() { SearchFacade.AdvSearch("Удивительный мир жуков", "", "Фитон+", "", "", WaitingType.PageLoad); Assert.IsTrue(Selenium.IsTextPresent("Удивительный мир жуков")); Assert.IsTrue(Selenium.GetLocation().Contains("/books/product/930921014")); }
public void AdvSearchPublisherAuthorTest() { SearchFacade.AdvSearch("", "Хессайон", "Кладезь-Букс", "", "", WaitingType.PageLoad); Assert.IsTrue(ProductListFacade.ContainsProductWithKey("54000028527")); Assert.IsFalse(ProductListFacade.ContainsProductWithKey("911007682")); }
public SearchController( SearchFacade searchFacade) { this.searchFacade = searchFacade; }
public void AdvSearchLastYearGreaterFirstYearTest() { SearchFacade.AdvSearch("Хессайон", "", "", "2005", "2004", WaitingType.PageLoad); Assert.IsTrue(SearchFacade.IsEmptyResult()); }
public void AdvSearchEmptyTest() { SearchFacade.AdvSearch("", "", "", "", "", WaitingType.SmallTimeout); Assert.IsTrue(SearchFacade.IsWrongSearchCriteria()); }
public void SearchEmptyResultTest() { SearchFacade.SimpleSearch("123456", WaitingType.PageLoad); Assert.IsTrue(SearchFacade.IsEmptyResult()); }
public void SearchExactNameTest() { SearchFacade.SimpleSearch("deadline", WaitingType.PageLoad); Assert.IsTrue(Selenium.IsTextPresent("Deadline.")); Assert.IsTrue(Selenium.GetLocation().Contains("/books/product/25000038009")); }
public SearchController(SearchFacade facade) { _searchFacade = facade; }
public void AdvSearchPublisherNameTest() { SearchFacade.AdvSearch("Все о розах", "", "Олма-Пресс", "", "", WaitingType.PageLoad); Assert.IsTrue(Selenium.GetLocation().Contains("/books/product/930527209")); }