ConfigurationPath Class

Utility methods and constants for manipulating Configuration paths

Namespace
Microsoft.Extensions.Configuration
Assemblies
  • Microsoft.Extensions.Configuration.Abstractions

Syntax

public class ConfigurationPath
class Microsoft.Extensions.Configuration.ConfigurationPath

Methods

Combine(System.Collections.Generic.IEnumerable<System.String>)

Combines path segments into one path.

Arguments:pathSegments (System.Collections.Generic.IEnumerable<System.String>) – The path segments to combine.
Return type:System.String
Returns:The combined path.
public static string Combine(IEnumerable<string> pathSegments)
Combine(System.String[])

Combines path segments into one path.

Arguments:pathSegments (System.String<System.String>[]) – The path segments to combine.
Return type:System.String
Returns:The combined path.
public static string Combine(params string[] pathSegments)
GetParentPath(System.String)

Extracts the path corresponding to the parent node for a given path.

Arguments:path (System.String) – The path.
Return type:System.String
Returns:The original path minus the last individual segment found in it. Null if the original path corresponds to a top level node.
public static string GetParentPath(string path)
GetSectionKey(System.String)

Extracts the last path segment from the path.

Arguments:path (System.String) – The path.
Return type:System.String
Returns:The last path segment of the path.
public static string GetSectionKey(string path)

Fields

KeyDelimiter()

The delimiter ”:” used to separate individual keys in a path.

Return type:System.String
public static readonly string KeyDelimiter