Beispiel #1
0
        /// <summary>Initialise une nouvelle instance de la classe <see cref="SourceControlProject"/></summary>
        /// <param name="configuration">The application configuration information.</param>
        /// <param name="projectId">The project id used to define which configuration will be used.</param>
        public SourceControlProject(TfsCommitMonitorConfigurationSection configuration, string projectId)
        {
            _configuration = configuration;
            _tfsServer     = _configuration.Servers[projectId];

            _teamProjectCollection = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri(ServerConfiguration.TfsTeamProjectCollection));
            _versionControlServer  = _teamProjectCollection.GetService <VersionControlServer>();

            foreach (MonitoredProjectItemConfigurationElement item in _tfsServer.Folders)
            {
                _monitoredItems.Add(item.ItemId, item.MonitoredFolder);
            }
        }
        public MainForm(IConfigurationProvider configurationProvider)
        {
            _configuration = configurationProvider.GetConfiguration();
            foreach (ServerConfigurationElement project in _configuration.Servers)
            {
                _projects.Add(new SourceControlProject(_configuration, project.Id));
            }

            InitializeComponent();

            ConfigureCommitNotifier();

            ConfigureCheckUpdateTimer();
        }