string.AddQueryParam(string, string, bool)

Here are the examples of the csharp api class string.AddQueryParam(string, string, bool) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

4 Examples 7

1. Example

Project: NServiceKit
Source File: ManageRolesTests.cs
View license
[Test]
        public void Can_access_Admin_service_with_AuthSecret()
        {
            BaseUri.AppendPath("requestlogs").AddQueryParam("authsecret", AuthSecret).GetStringFromUrl();
        }

2. Example

Project: NServiceKit
Source File: ServiceExtensions.cs
View license
public static string AddQueryParam(this string url, string key, object val, bool encode = true)
        {
            return url.AddQueryParam(key, val.ToString(), encode);
        }

3. Example

View license
protected bool DoHtmlRedirectIfConfigured(IHttpRequest req, IHttpResponse res, bool includeRedirectParam = false)
        {
            var htmlRedirect = this.HtmlRedirect ?? AuthService.HtmlRedirect;
            if (htmlRedirect != null && req.ResponseContentType.MatchesContentType(ContentType.Html))
            {
                var url = req.ResolveAbsoluteUrl(htmlRedirect);
                if (includeRedirectParam)
                {
                    var absoluteRequestPath = req.ResolveAbsoluteUrl("~" + req.PathInfo + ToQueryString(req.QueryString));
                    url = url.AddQueryParam("redirect", absoluteRequestPath);
                }

                res.RedirectToUrl(url);
                return true;
            }

            return false;
        }

4. Example

Project: NServiceKit
Source File: OAuthProvider.cs
View license
public override object Authenticate(IServiceBase authService, IAuthSession session, Auth request)
  /n ..... /n //View Source file for more details /n }