Class ConfigKeySubgroup
- Namespace
- MonkeyLoader.Resonite.Configuration
- Assembly
- MonkeyLoader.Resonite.Integration.dll
Represents a config key component, which marks keys that should be enumerated in (nested) subgroups for the settings.
public class ConfigKeySubgroup : IConfigKeySubgroup, IConfigKeyComponent<IDefiningConfigKey>, IComponent<IDefiningConfigKey>, ISubgroupedDataFeedItem, IPrioritizable
- Inheritance
-
ConfigKeySubgroup
- Implements
- Inherited Members
Remarks
Elements.Core.LocaleString keys for the subgroups are generated by appending the
subgroup's path up to that point to the parent ConfigSection's
FullId, all joined by periods (.).
This component can be added to multiple config keys, as it does not keep a reference to them.
Constructors
ConfigKeySubgroup(int, IEnumerable<string>)
Creates a new IConfigKeySubgroup component, which marks keys that should be enumerated in (nested) subgroups for the settings.
public ConfigKeySubgroup(int priority, IEnumerable<string> subgroupPath)
Parameters
priorityintThe priority of this subgroup. Higher comes first.
subgroupPathIEnumerable<string>The path that this subgroup should have. Must have at least one element.
Remarks
Elements.Core.LocaleString keys for the subgroups are generated by appending the
subgroup's path up to that point to the parent ConfigSection's
FullId, all joined by periods (.).
This component can be added to multiple config keys, as it does not keep a reference to them.
Exceptions
- NullReferenceException
When the
subgroupPathis null.- ArgumentOutOfRangeException
When the
subgroupPathdoesn't have at least one element.- ArgumentException
When any subgroup path element is null or whitespace.
ConfigKeySubgroup(int, string, params string[]?)
Creates a new IConfigKeySubgroup component, which marks keys that should be enumerated in (nested) subgroups for the settings.
public ConfigKeySubgroup(int priority, string path, params string[]? subgroupPath)
Parameters
priorityintThe priority of this subgroup. Higher comes first.
pathstringThe first segment of the subgroup path.
subgroupPathstring[]The further subgroup path elements.
Remarks
Elements.Core.LocaleString keys for the subgroups are generated by appending the
subgroup's path up to that point to the parent ConfigSection's
FullId, all joined by periods (.).
This component can be added to multiple config keys, as it does not keep a reference to them.
Exceptions
- ArgumentException
When any subgroup path element is null or whitespace.
ConfigKeySubgroup(string, params string[]?)
Creates a new IConfigKeySubgroup component, which marks keys that should be enumerated in (nested) subgroups for the settings.
public ConfigKeySubgroup(string path, params string[]? subgroupPath)
Parameters
pathstringThe first segment of the subgroup path.
subgroupPathstring[]The further subgroup path elements.
Remarks
Elements.Core.LocaleString keys for the subgroups are generated by appending the
subgroup's path up to that point to the parent ConfigSection's
FullId, all joined by periods (.).
This component can be added to multiple config keys, as it does not keep a reference to them.
Exceptions
- ArgumentException
When any subgroup path element is null or whitespace.
Properties
Priority
Gets the priority of this item. Use an agreed standard as a base.
public int Priority { get; }
Property Value
- int
An interger used to sort the prioritizable items.
Higher comes first with the default comparer.
SubgroupPath
Gets the path that the subgroup of this object should have.
Multiple segments are generated as nested subgroups.
public Sequence<string> SubgroupPath { get; }
Property Value
Remarks
Elements.Core.LocaleString keys for the subgroups are generated by appending the
subgroup's path up to that point to the parent IIdentifiable's
FullId, all joined by periods (.).