コード例 #1
0
        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);
        }
コード例 #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);
        }