Class ProjectConfigurationBuilderExtensions
เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน
Namespace: Cephalon.Engine.Configuration
Assembly: Cephalon.Engine.dll
Adds Cephalon project-configuration conventions to a configuration builder.
public static class ProjectConfigurationBuilderExtensionsInheritance
Section titled “Inheritance”object ← ProjectConfigurationBuilderExtensions
Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Remarks
Section titled “Remarks”
Cephalon keeps configuration-driven features friendly to large projects by supporting a
split-file convention under a project's Configurations folder.
The current convention loads root-level Add*.json files first, then loads every
{Environment}.json file found under the folder tree. These sources are inserted ahead
of standard host overrides such as appsettings.json, appsettings.{Environment}.json,
user secrets, environment variables, and command-line arguments so projects can keep Cephalon
defaults grouped by concern without losing the normal ASP.NET Core and generic-host override path.
Fields
Section titled “Fields”DefaultRootFolderName
Section titled “ DefaultRootFolderName”Gets the default root folder name used for split project configuration files.
public const string DefaultRootFolderName = "Configurations"Field Value
Section titled “Field Value”Methods
Section titled “Methods”AddCephalonProjectConfigurations(IConfigurationBuilder, string, string, string)
Section titled “ AddCephalonProjectConfigurations(IConfigurationBuilder, string, string, string)”Adds Cephalon project-configuration conventions to the supplied configuration builder.
public static IConfigurationBuilder AddCephalonProjectConfigurations(this IConfigurationBuilder configuration, string contentRootPath, string environmentName, string rootFolderName = "Configurations")Parameters
Section titled “Parameters”configuration IConfigurationBuilder
The configuration builder to extend.
contentRootPath string
The project content root that owns the Configurations folder.
environmentName string
The current host environment name, such as Development or Local.
rootFolderName string
The split-configuration root folder name. The default value is
Returns
Section titled “Returns”The same configuration builder for fluent composition.
Remarks
Section titled “Remarks”The convention currently loads:
Configurations/Add*.jsonConfigurations/**/{Environment}.json
Existing JSON configuration sources are not duplicated when this method is called more than once.