ConfigurationRootExtensions.GetDebugView Method

Definition

Overloads

GetDebugView(IConfigurationRoot)

Generates a human-readable view of the configuration showing where each value came from.

GetDebugView(IConfigurationRoot, Func<ConfigurationDebugViewContext,String>)

Generates a human-readable view of the configuration showing where each value came from.

GetDebugView(IConfigurationRoot)

Source:
ConfigurationRootExtensions.cs
Source:
ConfigurationRootExtensions.cs
Source:
ConfigurationRootExtensions.cs

Generates a human-readable view of the configuration showing where each value came from.

C#
public static string GetDebugView(this Microsoft.Extensions.Configuration.IConfigurationRoot root);

Parameters

Returns

The debug view.

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)

GetDebugView(IConfigurationRoot, Func<ConfigurationDebugViewContext,String>)

Source:
ConfigurationRootExtensions.cs
Source:
ConfigurationRootExtensions.cs
Source:
ConfigurationRootExtensions.cs

Generates a human-readable view of the configuration showing where each value came from.

C#
public static string GetDebugView(this Microsoft.Extensions.Configuration.IConfigurationRoot root, Func<Microsoft.Extensions.Configuration.ConfigurationDebugViewContext,string>? processValue);

Parameters

root
IConfigurationRoot

The configuration root.

processValue
Func<ConfigurationDebugViewContext,String>

The function for processing the value, for example, hiding secrets. Parameters: ConfigurationDebugViewContext: Context of the current configuration item. returns: A string value is used to assign as the Value of the configuration section.

Returns

The debug view.

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)