Exemplo n.º 1
0
        private void OnLocationChanged(object sender, string e)
        {
            string fullUri = UriHelper.ToAbsoluteUri(e).ToString();

            if (Store != null && !IsInsideMiddlewareChange && fullUri != Feature.State.Uri)
            {
                Store.Dispatch(new Go(e));
            }
        }
Exemplo n.º 2
0
        protected override Task HandleAsync(Go action, IDispatcher dispatcher)
        {
            Uri fullUri = UriHelper.ToAbsoluteUri(action.NewUri);

            if (fullUri.ToString() != UriHelper.GetAbsoluteUri())
            {
                // Only navigate if we are not already at the URI specified
                UriHelper.NavigateTo(action.NewUri);
            }
            return(Task.CompletedTask);
        }
Exemplo n.º 3
0
        public override Task <IAction[]> HandleAsync(Go action)
        {
            Uri fullUri = UriHelper.ToAbsoluteUri(action.NewUri);

            if (fullUri.ToString() != UriHelper.GetAbsoluteUri())
            {
                // Only navigate if we are not already at the URI specified
                UriHelper.NavigateTo(action.NewUri);
            }
            return(Task.FromResult(new IAction[0]));
        }
        public HttpApiClientRequestBuilder(HttpClient httpClient,
                                           string uri,
                                           IUriHelper uriHelper,
                                           IBrowserCookieService browserCookieService, IJsInterop jsInterop, IMessageService messageService)
        {
            _relativeUri = uri;
            _uri         = uriHelper.ToAbsoluteUri(uri).ToString();
            _uriHelper   = uriHelper;
            _httpClient  = httpClient;

            _browserCookieService = browserCookieService;
            _jsInterop            = jsInterop;
            _messageService       = messageService;
        }