/
IConfigurationBuilder.cs
38 lines (33 loc) · 1.45 KB
/
IConfigurationBuilder.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
namespace Microsoft.Extensions.Configuration
{
/// <summary>
/// Represents a type used to build application configuration.
/// </summary>
public interface IConfigurationBuilder
{
/// <summary>
/// Gets a key/value collection that can be used to share data between the <see cref="IConfigurationBuilder"/>
/// and the registered <see cref="IConfigurationSource"/>s.
/// </summary>
IDictionary<string, object> Properties { get; }
/// <summary>
/// Gets the sources used to obtain configuration values
/// </summary>
IList<IConfigurationSource> Sources { get; }
/// <summary>
/// Adds a new configuration source.
/// </summary>
/// <param name="source">The configuration source to add.</param>
/// <returns>The same <see cref="IConfigurationBuilder"/>.</returns>
IConfigurationBuilder Add(IConfigurationSource source);
/// <summary>
/// Builds an <see cref="IConfiguration"/> with keys and values from the set of sources registered in
/// <see cref="Sources"/>.
/// </summary>
/// <returns>An <see cref="IConfigurationRoot"/> with keys and values from the registered sources.</returns>
IConfigurationRoot Build();
}
}