public GitExtLinksParser(RepoDistSettings aSettings)            
        {
            Settings = new RepoDistSettings(null, aSettings.SettingsCache);
            LoadFromSettings();

            if (aSettings.LowerPriority == null)
                LowerPriority = null;
            else
                LowerPriority = new GitExtLinksParser(aSettings.LowerPriority);
        }
 protected override void  SettingsToPage() 	
 {
     parser = new GitExtLinksParser(CurrentSettings);
     ReloadCategories();
     if (_NO_TRANSLATE_Categories.Items.Count > 0)
     {
         _NO_TRANSLATE_Categories.SelectedIndex = 0;
     }
     CategoryChanged();
 }
Esempio n. 3
0
        public GitExtLinksParser(RepoDistSettings aSettings)
        {
            Settings = new RepoDistSettings(null, aSettings.SettingsCache);
            LoadFromSettings();

            if (aSettings.LowerPriority == null)
            {
                LowerPriority = null;
            }
            else
            {
                LowerPriority = new GitExtLinksParser(aSettings.LowerPriority);
            }
        }
Esempio n. 4
0
        private string GetLinksForRevision(GitRevision revision)
        {
            GitExtLinksParser parser = new GitExtLinksParser(Module.Settings);
            var links = parser.Parse(revision).Distinct();
            var linksString = string.Empty;

            foreach (var link in links)
            {
               linksString = linksString.Combine(", ", LinkFactory.CreateLink(link.Caption, link.URI));
            }

            if (linksString.IsNullOrEmpty())
                return string.Empty;
            else
                return WebUtility.HtmlEncode(trsLinksRelatedToRevision.Text) + " " + linksString;
        }
Esempio n. 5
0
 private bool ParseGitHubCommitFormatRevisionLink()
 {
     var revisionLinks = new GitExtLinksParser(Module.EffectiveSettings);
     bool hasGitHubCommitFormatRevisionLink = revisionLinks.EffectiveLinkDefs.Any(
         r => r.LinkFormats.Any(IsGitHubCommitLinkFormat));
     return hasGitHubCommitFormatRevisionLink;
 }