mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
Added constructor overload
This commit is contained in:
1 parent
bea37d815a
commit
b5e35e2533
1 file changed
+10
@@ -30,6 +30,16 @@ public class ModdedOptionList<T> : IModdedOptionList where T : IModdedOption
|
||||
Options = Enumerable.Range(0, Count).Select(optionFactory).ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ModdedOptionList{T}"/> class.
|
||||
/// </summary>
|
||||
/// <param name="options">The options list.</param>
|
||||
public ModdedOptionList(IEnumerable<T> options)
|
||||
{
|
||||
Count = options.Count();
|
||||
Options = options.ToArray();
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IEnumerator<IModdedOption> GetEnumerator()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user