/// <summary> /// Navigates the client by specifying redirection type. /// </summary> /// <param name="redirectionType">Type of the redirection.</param> /// <param name="bookmarkName">Name of the bookmark.</param> public void Redirect(RedirectionType redirectionType, string bookmarkName = null) { PreviousNavigatedUrl = _context.Request.Uri.AbsoluteUri; switch (redirectionType) { case RedirectionType.RedirectUrl: Redirect(string.IsNullOrEmpty(RedirectUrl) ? _context.SiteUrl : RedirectUrl); break; case RedirectionType.LoginReturnUrl: Redirect(string.IsNullOrEmpty(LoginReturnUrl) ? _context.SiteUrl : LoginReturnUrl); break; case RedirectionType.PreviousPage: Redirect(string.IsNullOrEmpty(PreviousPageUrl) ? _context.SiteUrl : PreviousPageUrl); break; case RedirectionType.PreviousPageWithBookmark: Redirect(string.IsNullOrEmpty(PreviousPageUrl) ? _context.SiteUrl : PreviousPageUrl + "#" + bookmarkName); break; case RedirectionType.CurrentPage: Redirect(_context.Request.Uri.AbsoluteUri); break; case RedirectionType.DefaultPage: Redirect(_context.SiteUrl); break; } }
public void SetRedirectionType(RedirectionType redirectionType) { this.Set(AutoDiscoverMetadata.RedirectType, (int)redirectionType); }
protected Redirect Redirect(RedirectionType redirectionType = RedirectionType.DefaultPage, string bookmarkName = null) { return(new Redirect(redirectionType, bookmarkName)); }
/// <summary> /// Redirects the client by specifying redirection type. /// </summary> /// <param name="redirectionType">Type of the navigation.</param> /// <param name="bookmarkName">Name of the bookmark.</param> public Redirect(RedirectionType redirectionType = RedirectionType.DefaultPage, string?bookmarkName = null) { RedirectionType = redirectionType; BookmarkName = bookmarkName; }
/// <summary> /// Redirects the client by specifying redirection type. /// </summary> /// <param name="redirectionType">Type of the navigation.</param> /// <param name="bookmarkName">Name of the bookmark.</param> public Redirect(RedirectionType redirectionType = RedirectionType.DefaultPage, string bookmarkName = null) { RedirectionType = redirectionType; BookmarkName = bookmarkName; }