Class RepetitionInfo
Provides contextual information about a repetition/iteration. This is used in looping constructs.
Inheritance
Implements
Inherited Members
Namespace: ZptSharp.Expressions
Assembly: ZptSharp.Abstractions.dll
Syntax
public class RepetitionInfo : IGetsNamedTalesValue
Constructors
| Improve this Doc View SourceRepetitionInfo(IGetsAlphabeticValueForNumber, IGetsRomanNumeralForNumber)
Initializes a new instance of the RepetitionInfo class.
Declaration
public RepetitionInfo(IGetsAlphabeticValueForNumber alphabeticValueProvider, IGetsRomanNumeralForNumber romanNumeralProvider)
Parameters
Type | Name | Description |
---|---|---|
IGetsAlphabeticValueForNumber | alphabeticValueProvider | Alphabetic value provider. |
IGetsRomanNumeralForNumber | romanNumeralProvider | Roman numeral provider. |
Properties
| Improve this Doc View SourceCount
Gets or sets the total number of items in the repetition.
Declaration
public int Count { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The count. |
CurrentIndex
Gets or sets the zero-based index of the current iteration.
Declaration
public int CurrentIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The index of the current iteration. |
CurrentValue
Gets or sets the value associated with the current iteration.
Declaration
public object CurrentValue { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The current value. |
Name
Gets or sets the name of the repetition.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name. |
Node
Gets or sets the node associated with the repetition.
Declaration
public INode Node { get; set; }
Property Value
Type | Description |
---|---|
INode | The node. |
Methods
| Improve this Doc View SourceTryGetValueAsync(String, CancellationToken)
Attempts to get a value for a named reference, relative to the current instance.
Declaration
public Task<GetValueResult> TryGetValueAsync(string name, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the value to retrieve. |
System.Threading.CancellationToken | cancellationToken | An optional cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<GetValueResult> | An object indicating whether a value was successfully retrieved or not, along with the retrieved value (if applicable). |