Class EngineOptions
เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน
Namespace: Cephalon.Engine.Configuration
Assembly: Cephalon.Engine.dll
Captures module and capability enablement overrides for the runtime.
public sealed class EngineOptionsInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
Section titled “Constructors”EngineOptions(IReadOnlyDictionary<string, bool>?, IReadOnlyDictionary<string, bool>?)
Section titled “ EngineOptions(IReadOnlyDictionary<string, bool>?, IReadOnlyDictionary<string, bool>?)”Initializes a new instance of the
public EngineOptions(IReadOnlyDictionary<string, bool>? modules = null, IReadOnlyDictionary<string, bool>? capabilities = null)Parameters
Section titled “Parameters”modules IReadOnlyDictionary<string, bool>?
Module enablement overrides keyed by module identifier.
capabilities IReadOnlyDictionary<string, bool>?
Capability enablement overrides keyed by capability key.
Properties
Section titled “Properties”Capabilities
Section titled “ Capabilities”Gets capability enablement overrides keyed by capability key.
public IReadOnlyDictionary<string, bool> Capabilities { get; }Property Value
Section titled “Property Value”IReadOnlyDictionary<string, bool>
Gets an empty options instance with no explicit overrides.
public static EngineOptions Empty { get; }Property Value
Section titled “Property Value”HasValues
Section titled “ HasValues”Gets a value indicating whether any explicit option overrides are present.
public bool HasValues { get; }Property Value
Section titled “Property Value”Modules
Section titled “ Modules”Gets module enablement overrides keyed by module identifier.
public IReadOnlyDictionary<string, bool> Modules { get; }Property Value
Section titled “Property Value”IReadOnlyDictionary<string, bool>
Methods
Section titled “Methods”FromConfiguration(IConfiguration, string)
Section titled “ FromConfiguration(IConfiguration, string)”Reads engine options from configuration.
public static EngineOptions FromConfiguration(IConfiguration configuration, string sectionPath = "Engine")Parameters
Section titled “Parameters”configuration IConfiguration
The configuration source that contains the engine section.
sectionPath string
The root configuration section path to read from.
Returns
Section titled “Returns”The parsed engine options.
IsCapabilityEnabled(string)
Section titled “ IsCapabilityEnabled(string)”Determines whether a capability is enabled under the current option set.
public bool IsCapabilityEnabled(string capabilityKey)Parameters
Section titled “Parameters”capabilityKey string
The capability key to evaluate.
Returns
Section titled “Returns”true when the capability is enabled; otherwise, false.
IsModuleEnabled(string)
Section titled “ IsModuleEnabled(string)”Determines whether a module is enabled under the current option set.
public bool IsModuleEnabled(string moduleId)Parameters
Section titled “Parameters”moduleId string
The module identifier to evaluate.
Returns
Section titled “Returns”true when the module is enabled; otherwise, false.
Merge(EngineOptions?)
Section titled “ Merge(EngineOptions?)”Merges another option set into the current instance.
public EngineOptions Merge(EngineOptions? other)Parameters
Section titled “Parameters”other EngineOptions?
The option set to overlay on top of the current values.
Returns
Section titled “Returns”A merged option set.