コード例 #1
0
 /// <summary>
 /// Adds a new configuration source.
 /// </summary>
 /// <param name="configurationSource">The configuration source to add.</param>
 /// <param name="load">If true, the configuration source's <see cref="IConfigurationSource.Load"/> method will
 ///  be called.</param>
 /// <returns>The same configuration source.</returns>
 /// <remarks>This method is intended only for test scenarios.</remarks>
 public IConfigurationBuilder Add(IConfigurationSource configurationSource, bool load)
 {
     if (load)
     {
         configurationSource.Load();
     }
     _sources.Add(configurationSource);
     return(this);
 }
コード例 #2
0
 /// <summary>
 /// Adds a new configuration source.
 /// </summary>
 /// <param name="configurationSource">The configuration source to add.</param>
 /// <param name="load">If true, the configuration source's <see cref="IConfigurationSource.Load"/> method will
 ///  be called.</param>
 /// <returns>The same configuration source.</returns>
 /// <remarks>This method is intended only for test scenarios.</remarks>
 public IConfigurationBuilder Add(IConfigurationSource configurationSource, bool load)
 {
     if (load)
     {
         configurationSource.Load();
     }
     _sources.Add(configurationSource);
     return this;
 }
コード例 #3
0
        IConfigurationSource IConfiguration.AddConfigurationSource(IConfigurationSource source, bool addPath)
        {
            _ConfigurationSources.Add(source);
            if (addPath)
            {
                Interface.AddConfigurationItem(new IConfigurationItemImpl(source.Name, Path.GetDirectoryName(source.URI), eConfigurationSource.NonPersistent));
            }

            if (_AutoName)
            {
                source.Load(this);
                source.New();
            }
            else
            {
                Interface.Refresh();
            }

            return(source);
        } //void IConfiguration.AddConfigurationSource( ...
コード例 #4
0
 public IConfigurationSourceContainer Add(IConfigurationSource configurationSource)
 {
     configurationSource.Load();
     return(AddLoadedSource(configurationSource));
 }
コード例 #5
0
 public IConfigurationSourceRoot Add(IConfigurationSource configurationSource)
 {
     configurationSource.Load();
     return AddLoadedSource(configurationSource);
 }