A structured representation of the data xrepo info prints out about a package. xrepo info uses a bespoke format which expresses data relationship with indentation. One item can have multiple items associated with it if they're indented further inside. It's almost like YAML but it differs ever so slightly. Items can have a key optionally if they have : after a single first word these are named items and accessible with a string indexer. Value only items are accessible only through an integer indexer. All items are iterated upon via the IEnumerable interface.
More...
|
| static XRepoItem | Parse (IEnumerable< Output > toolOutput) |
| | Parse the xrepo info structure from a Tool output.
|
| |
|
| required Kind | ItemKind [get] |
| | To help distinguish items from each other.
|
| |
| string? | Value [get] |
| | This item specifies a value which is arbitrary text either after key: or the entire line if key was not present.
|
| |
| string? | Key [get] |
| | This item specifies a key which is a short identifier at the beginning of the line like mykey:
|
| |
| XRepoItem? | this[int i] [get] |
| | Get one unnamed sub-item, return null if out-of-bounds.
|
| |
| XRepoItem? | this[string i] [get] |
| | Get one named sub-item, return null if doesn't exist.
|
| |
|
|
static bool | IsItemLine (string line) |
| |
|
static bool | IsWithinCurrentItem (string line, int indent) |
| |
|
static int | GetIndent (string line) |
| |
| static XRepoItem | Parse (ref List< string > infoOutput, ref int i) |
| |
A structured representation of the data xrepo info prints out about a package. xrepo info uses a bespoke format which expresses data relationship with indentation. One item can have multiple items associated with it if they're indented further inside. It's almost like YAML but it differs ever so slightly. Items can have a key optionally if they have : after a single first word these are named items and accessible with a string indexer. Value only items are accessible only through an integer indexer. All items are iterated upon via the IEnumerable interface.
Definition at line 22 of file XRepoItem.cs.
◆ Kind
Kind of the info item represented.
| Enumerator |
|---|
| Root | The main item containing all other items output by xrepo info. It has no key and no value.
|
| Package | Represents data abpuut a package (require(myPackage)). It has Key only.
|
| Key | An item which has only a key and no value ( -> mykey:)
|
| Property | An item which has both a key and a value ( -> mykey: foobar)
|
| Value | An item which doesn't have a key associated usually a list of stuff ( -> foobar)
|
| Invalid | If for any cursed reason an item couldn't be parsed while it was passing the IsItemLine check. This indicates a bug in the code.
|
Definition at line 27 of file XRepoItem.cs.
◆ GetEnumerator() [1/2]
| IEnumerator< XRepoItem > Nuke.Cola.Tooling.XRepoItem.GetEnumerator |
( |
| ) |
|
◆ GetEnumerator() [2/2]
| IEnumerator IEnumerable. Nuke.Cola.Tooling.XRepoItem.GetEnumerator |
( |
| ) |
|
|
private |
◆ Parse() [1/2]
| static XRepoItem Nuke.Cola.Tooling.XRepoItem.Parse |
( |
IEnumerable< Output > | toolOutput | ) |
|
|
staticpackage |
Parse the xrepo info structure from a Tool output.
Definition at line 169 of file XRepoItem.cs.
◆ Parse() [2/2]
| static XRepoItem Nuke.Cola.Tooling.XRepoItem.Parse |
( |
ref List< string > | infoOutput, |
|
|
ref int | i ) |
|
staticprivate |
◆ _namedItems
| Dictionary<string, XRepoItem> Nuke.Cola.Tooling.XRepoItem._namedItems = [] |
|
private |
◆ _unnamedItems
| List<XRepoItem> Nuke.Cola.Tooling.XRepoItem._unnamedItems = [] |
|
private |
◆ MinimumIndent
| const int Nuke.Cola.Tooling.XRepoItem.MinimumIndent = 4 |
|
staticprivate |
◆ ItemKind
| required Kind Nuke.Cola.Tooling.XRepoItem.ItemKind |
|
get |
To help distinguish items from each other.
Definition at line 65 of file XRepoItem.cs.
◆ Key
| string? Nuke.Cola.Tooling.XRepoItem.Key |
|
get |
This item specifies a key which is a short identifier at the beginning of the line like mykey:
Definition at line 77 of file XRepoItem.cs.
◆ this[int i]
| XRepoItem? Nuke.Cola.Tooling.XRepoItem.this[int i] |
|
get |
Get one unnamed sub-item, return null if out-of-bounds.
Definition at line 97 of file XRepoItem.cs.
◆ this[string i]
| XRepoItem? Nuke.Cola.Tooling.XRepoItem.this[string i] |
|
get |
Get one named sub-item, return null if doesn't exist.
Definition at line 102 of file XRepoItem.cs.
◆ Value
| string? Nuke.Cola.Tooling.XRepoItem.Value |
|
get |
This item specifies a value which is arbitrary text either after key: or the entire line if key was not present.
Definition at line 71 of file XRepoItem.cs.
The documentation for this class was generated from the following file:
- /home/runner/work/md.Nuke.Cola/md.Nuke.Cola/md.Nuke.Cola/Tooling/XRepoItem.cs