public static string GetNewIssueLink(string link, IssueInformation issueInfo)
        {
            IIssueFormatter formatter = null;

            switch (issueInfo.IssueType)
            {
            case IssueType.NoFailure:
                formatter = new NoFailuresIssueFormatter(issueInfo);
                break;

            case IssueType.SingleFailure:
                formatter = new SingleFailureIssueFormatter(issueInfo);
                break;

            default:
                return(string.Empty);
            }

            string FormattedURL = string.Format(CultureInfo.InvariantCulture, Properties.Resources.FormattedLink,
                                                link,
                                                formatter.GetFormattedTitle(),
                                                formatter.GetFormattedBody());
            string escapedURL = Uri.EscapeUriString(FormattedURL).Replace("#", "%23");

            return(escapedURL);
        }
Esempio n. 2
0
        private string GetLink(string link, IIssueFormatter formatter)
        {
            string FormattedURL = string.Format(CultureInfo.InvariantCulture, GitHub.Properties.Resources.FormattedLink,
                                                link,
                                                formatter.GetFormattedTitle(),
                                                formatter.GetFormattedBody());
            string escapedURL = Uri.EscapeUriString(FormattedURL).Replace("#", "%23");

            return(escapedURL);
        }