Esempio n. 1
0
        public override string ToString()
        {
            var result = new StringBuilder();

            if (SonarPagingQuery != null)
            {
                result.Append(SonarPagingQuery.ToString());
            }
            SonarHelpers.AppendUrl(result, "q", Q);

            return(result.Length > 0 ? "?" + result : string.Empty);
        }
Esempio n. 2
0
        public override string ToString()
        {
            var result = new StringBuilder();

            if (SonarPagingQuery != null)
            {
                result.Append(SonarPagingQuery.ToString());
            }
            SonarHelpers.AppendUrl(result, "projectId", ProjectId);
            SonarHelpers.AppendUrl(result, "projectKey", ProjectKey);
            SonarHelpers.AppendUrl(result, "q", Q);
            if (Qualifier != null)
            {
                SonarHelpers.AppendUrl(result, "qualifier", Qualifier.ToString());
            }

            return(result.Length > 0 ? "?" + result : string.Empty);
        }
        public override string ToString()
        {
            var result = new StringBuilder();

            if (Id.HasValue)
            {
                SonarHelpers.AppendUrl(result, "id", Id.ToString());
            }
            SonarHelpers.AppendUrl(result, "name", Name);
            if (SonarPagingQuery != null)
            {
                result.Append(SonarPagingQuery.ToString());
            }
            SonarHelpers.AppendUrl(result, "q", Q);
            if (Selected.HasValue)
            {
                SonarHelpers.AppendUrl(result, "selected", Selected.ToString());
            }

            return(result.Length > 0 ? "?" + result : string.Empty);
        }
Esempio n. 4
0
        public override string ToString()
        {
            var result = new StringBuilder();

            result.Append(SonarPagingQuery.ToString());

            SonarHelpers.AppendUrl(result, "issues", IssuesKeys);
            if (Assigned != null)
            {
                SonarHelpers.AppendUrl(result, "assigned", Assigned.ToString().ToLowerInvariant());
            }
            SonarHelpers.AppendUrl(result, "statuses", Statuses);
            SonarHelpers.AppendUrl(result, "tags", Tags);
            if (CreatedAfter != null)
            {
                SonarHelpers.AppendUrl(result, "createdAfter", WebUtility.UrlEncode(SonarHelpers.FormatDateForSonarIso8601(CreatedAfter.Value)));
                // when scanning for createdAfter, automatically sort by created date
                SonarHelpers.AppendUrl(result, "s", "CREATION_DATE");
                SonarHelpers.AppendUrl(result, "asc", "true");
            }
            if (CreatedAt != null)
            {
                SonarHelpers.AppendUrl(result, "createdAt", WebUtility.UrlEncode(SonarHelpers.FormatDateForSonarIso8601(CreatedAt.Value)));
            }
            if (CreatedBefore != null)
            {
                SonarHelpers.AppendUrl(result, "createdBefore", WebUtility.UrlEncode(SonarHelpers.FormatDateForSonarIso8601(CreatedBefore.Value)));
            }
            SonarHelpers.AppendUrl(result, "additionalFields", AdditionalFields);
            SonarHelpers.AppendUrl(result, "assignees", Assignees);
            SonarHelpers.AppendUrl(result, "authors", Authors);
            SonarHelpers.AppendUrl(result, "componentKeys", ComponentKeys);
            SonarHelpers.AppendUrl(result, "componentUuids", ComponentUuids);
            SonarHelpers.AppendUrl(result, "severities", Severities);
            SonarHelpers.AppendUrl(result, "rules", Rules);
            SonarHelpers.AppendUrl(result, "projectKeys", ProjectKeys);
            SonarHelpers.AppendUrl(result, "resolved", Resolved.ToString().ToLowerInvariant());

            return(result.Length > 0 ? "?" + result : string.Empty);
        }