Ejemplo n.º 1
0
        /// <summary>
        /// Parse all remote blocks in an existing configuration file, looking for
        /// remotes configuration.
        /// </summary>
        /// <param name="rc">
        /// The existing configuration to get the remote settings from.
        /// The configuration must already be loaded into memory.
        /// </param>
        /// <returns>
        /// All remotes configurations existing in provided repository
        /// configuration. Returned configurations are ordered
        /// lexicographically by names.
        /// </returns>
        public static List <RemoteConfig> GetAllRemoteConfigs(RepositoryConfig rc)
        {
            var names = new List <string>(rc.getSubsections(Section));

            names.Sort();

            var result = new List <RemoteConfig>(names.Count);

            foreach (string name in names)
            {
                result.Add(new RemoteConfig(rc, name));
            }

            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Parse all remote blocks in an existing configuration file, looking for
        /// remotes configuration.
        /// </summary>
        /// <param name="rc">
        /// The existing configuration to get the remote settings from.
        /// The configuration must already be loaded into memory.
        /// </param>
        /// <returns>
        /// All remotes configurations existing in provided repository
        /// configuration. Returned configurations are ordered
        /// lexicographically by names.
        /// </returns>
        public static List <RemoteConfig> GetAllRemoteConfigs(RepositoryConfig rc)
        {
            if (rc == null)
            {
                throw new ArgumentNullException("rc");
            }
            var names = new List <string>(rc.getSubsections(Section));

            names.Sort();

            var result = new List <RemoteConfig>(names.Count);

            foreach (string name in names)
            {
                result.Add(new RemoteConfig(rc, name));
            }

            return(result);
        }
Ejemplo n.º 3
0
		/// <summary>
		/// Parse all remote blocks in an existing configuration file, looking for
		/// remotes configuration.
		/// </summary>
		/// <param name="rc">
		/// The existing configuration to get the remote settings from.
		/// The configuration must already be loaded into memory.
		/// </param>
		/// <returns>
		/// All remotes configurations existing in provided repository
		/// configuration. Returned configurations are ordered
		/// lexicographically by names.
		/// </returns>
		public static List<RemoteConfig> GetAllRemoteConfigs(RepositoryConfig rc)
		{
			if (rc == null)
				throw new ArgumentNullException ("rc");
			var names = new List<string>(rc.getSubsections(Section));
			names.Sort();

			var result = new List<RemoteConfig>(names.Count);
			foreach (string name in names)
			{
				result.Add(new RemoteConfig(rc, name));
			}

			return result;
		}
Ejemplo n.º 4
0
        /// <summary>
        /// Parse all remote blocks in an existing configuration file, looking for
        /// remotes configuration.
        /// </summary>
        /// <param name="rc">
        /// The existing configuration to get the remote settings from.
        /// The configuration must already be loaded into memory.
        /// </param>
        /// <returns>
        /// All remotes configurations existing in provided repository
        /// configuration. Returned configurations are ordered
        /// lexicographically by names.
        /// </returns>
        public static List<RemoteConfig> GetAllRemoteConfigs(RepositoryConfig rc)
        {
            var names = new List<string>(rc.getSubsections(Section));
            names.Sort();

            var result = new List<RemoteConfig>(names.Count);
            foreach (string name in names)
            {
                result.Add(new RemoteConfig(rc, name));
            }

            return result;
        }