Exemplo n.º 1
0
        public async Task UseBrowserProfileAsync(BrowserProfile browserProfile, string requestUrl, bool saveRequestUrl)
        {
            if (saveRequestUrl)
            {
                var requestDomain = SelectionRule.GetPartFromUrl(SelectionRule.SelectionRuleParts.Domain, requestUrl);
                var command       = new CreateProfileSelectionRuleCommand(
                    browserProfile.Profile.Id,
                    SelectionRule.SelectionRuleParts.Domain,
                    SelectionRule.SelectionRuleCompareTypes.Equals,
                    requestDomain);

                await _mediator.Send(command);
            }

            browserProfile.NavigateToUrl(requestUrl);

            await _mediator.Send(new ApplicationShutdownCommand());
        }
Exemplo n.º 2
0
 public void NavigateToUrl(string url)
 {
     _browserProfile.NavigateToUrl(url);
 }