Class CmdGroupInitializer
- Namespace
- RichHudFramework.UI
- Assembly
- RichHudClient.dll
A helper container used to define a list of commands and their callbacks before registering them to a ICommandGroup.
public class CmdGroupInitializer : IReadOnlyList<MyTuple<string, Action<string[]>, int>>, IReadOnlyCollection<MyTuple<string, Action<string[]>, int>>, IEnumerable<MyTuple<string, Action<string[]>, int>>, IEnumerable
- Inheritance
-
CmdGroupInitializer
- Implements
Constructors
CmdGroupInitializer(int)
public CmdGroupInitializer(int capacity = 0)
Parameters
capacityint
Properties
Count
Gets the number of elements in the collection.
public int Count { get; }
Property Value
- int
The number of elements in the collection.
this[int]
Gets the element at the specified index in the read-only list.
public MyTuple<string, Action<string[]>, int> this[int index] { get; }
Parameters
indexintThe zero-based index of the element to get.
Property Value
Methods
Add(string, Action<string[]>, int)
Adds a command definition to the initializer.
public void Add(string cmdName, Action<string[]> callback = null, int argsRequrired = 0)
Parameters
cmdNamestringThe name of the command.
callbackAction<string[]>The delegate to invoke when the command is run.
argsRequriredintThe minimum arguments required.
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<MyTuple<string, Action<string[]>, int>> GetEnumerator()
Returns
- IEnumerator<MyTuple<string, Action<string[]>, int>>
An enumerator that can be used to iterate through the collection.
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Returns an enumerator that iterates through a collection.
IEnumerator IEnumerable.GetEnumerator()
Returns
- IEnumerator
An IEnumerator object that can be used to iterate through the collection.