Class CommandParameters
Inheritance
System.Object
CommandParameters
Implements
IReadOnlyCollection<System.String>
Assembly: OpenMod.Core.dll
Syntax
public class CommandParameters : object, ICommandParameters, IReadOnlyCollection<string>
Constructors
|
Improve this Doc
View Source
CommandParameters(ICommandContext, ICollection<String>)
Declaration
public CommandParameters(ICommandContext commandContext, ICollection<string> args)
Parameters
Type |
Name |
Description |
ICommandContext |
commandContext |
|
ICollection<System.String> |
args |
|
Properties
|
Improve this Doc
View Source
Count
Declaration
public int Count { get; }
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Item[Int32]
Declaration
public string this[int index] { get; }
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Length
Declaration
public int Length { get; }
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
RawParameters
The internal stored raw parameter list.
Declaration
protected ICollection<string> RawParameters { get; }
Property Value
Type |
Description |
ICollection<System.String> |
|
Methods
|
Improve this Doc
View Source
GetArgumentLine(Int32)
Declaration
public string GetArgumentLine(int startPosition)
Parameters
Type |
Name |
Description |
System.Int32 |
startPosition |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
GetArgumentLine(Int32, Int32)
Declaration
public string GetArgumentLine(int startPosition, int endPosition)
Parameters
Type |
Name |
Description |
System.Int32 |
startPosition |
|
System.Int32 |
endPosition |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
GetAsync(Int32, Type)
Declaration
public Task<object> GetAsync(int index, Type type)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Type |
type |
|
Returns
Type |
Description |
Task<System.Object> |
|
|
Improve this Doc
View Source
GetAsync(Int32, Type, Nullable<Object>)
Declaration
public Task<object?> GetAsync(int index, Type type, object? defaultValue)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Type |
type |
|
System.Nullable<System.Object> |
defaultValue |
|
Returns
Type |
Description |
Task<System.Nullable<System.Object>> |
|
|
Improve this Doc
View Source
GetAsync<T>(Int32)
Declaration
public Task<T> GetAsync<T>(int index)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Returns
Type Parameters
|
Improve this Doc
View Source
GetAsync<T>(Int32, T)
Declaration
public Task<T> GetAsync<T>(int index, T defaultValue)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
T |
defaultValue |
|
Returns
Type Parameters
|
Improve this Doc
View Source
GetEnumerator()
Declaration
public IEnumerator<string> GetEnumerator()
Returns
Type |
Description |
IEnumerator<System.String> |
|
|
Improve this Doc
View Source
ToArray()
Declaration
public string[] ToArray()
Returns
Type |
Description |
System.String[] |
|
|
Improve this Doc
View Source
ToList()
Declaration
public List<string> ToList()
Returns
Type |
Description |
List<System.String> |
|
|
Improve this Doc
View Source
TryGet(Int32, Type, out Nullable<Object>)
Declaration
public bool TryGet(int index, Type type, out object? value)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Type |
type |
|
System.Nullable<System.Object> |
value |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
TryGet<T>(Int32, out T)
Declaration
public bool TryGet<T>(int index, out T value)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
T |
value |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
Implements
IReadOnlyCollection<>
Extension Methods