forked from open-telemetry/opentelemetry-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnvironmentVariablesConfigurationSource.cs
More file actions
29 lines (26 loc) · 1.12 KB
/
EnvironmentVariablesConfigurationSource.cs
File metadata and controls
29 lines (26 loc) · 1.12 KB
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
// <auto-generated /> (Turns off StyleCop analysis in this file.)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
#nullable enable
namespace Microsoft.Extensions.Configuration.EnvironmentVariables
{
/// <summary>
/// Represents environment variables as an <see cref="IConfigurationSource"/>.
/// </summary>
internal sealed class EnvironmentVariablesConfigurationSource : IConfigurationSource
{
/// <summary>
/// A prefix used to filter environment variables.
/// </summary>
public string? Prefix { get; set; }
/// <summary>
/// Builds the <see cref="EnvironmentVariablesConfigurationProvider"/> for this source.
/// </summary>
/// <param name="builder">The <see cref="IConfigurationBuilder"/>.</param>
/// <returns>A <see cref="EnvironmentVariablesConfigurationProvider"/></returns>
public IConfigurationProvider Build(IConfigurationBuilder builder)
{
return new EnvironmentVariablesConfigurationProvider(Prefix);
}
}
}