コード例 #1
0
ファイル: AddArtifactsForm.cs プロジェクト: tocsleung/npanday
        private NPanday.Model.Settings.Repository getRepository(string url)
        {
            if (string.IsNullOrEmpty(url))
            {
                return(null);
            }

            // extract from NPanday repositories first
            NPanday.Model.Settings.Repository repo;
            NPanday.Model.Settings.Profile    defaultProfile = getDefaultProfile();
            if (defaultProfile != null)
            {
                repo = SettingsUtil.GetRepositoryFromProfile(defaultProfile, url);
                if (repo != null)
                {
                    return(repo);
                }
            }

            // extract from NON-NPanday repositories
            return(SettingsUtil.GetRepositoryByUrl(settings, url));
        }