Argument Collection

An argument collection extends Collection and adds additional behaviors specific to argument collections.

public class CdmArgumentCollection extends CdmCollection<CdmArgumentDefinition>

Constructors

Name Description
CdmArgumentCollection(CdmCorpusContext, CdmTraitReference)
ctx: The corpus context.
owner: The owner of this collection. Must be a trait reference because this collection is optimized to handle adjustments to the trait when adding an argument.
Initializes a new instance of the CdmArgumentCollection class.

Methods

Name Description Return Type
Add(CdmArgumentDefinition)
arg: The argument to add to the collection.

append(...) in Python, push(...) in TypeScript.
Adds the specified argument to the collection. Returns the argument that was added to the collection. CdmArgumentDefinition
Add(string, dynamic)
name: The name of the argument to add to the collection.
value: The value of the argument to add to the collection.

append(...) in Python, push(...) in TypeScript.
Creates an argument with the specified name and value and adds it to the collection. Returns the argument that was added to the collection. CdmArgumentDefinition
AddRange(IEnumerable<CdmArgumentDefinition>)
argumentList: The list of arguments to add.

addAll(...) in Java, extend(...) in Python, concat(...) in TypeScript.
Adds the elements of the specified list of arguments to the collection. void
Insert(int, CdmArgumentDefinition)
index: The index to insert the argument at.
arg: The argument to add to the collection.

add(...) in Java.
Inserts the argument into the collection at the specified index. void
FetchValue(string)
name: The name of the argument to fetch the value of.
Returns the value of the argument with the specified name. dynamic
UpdateArgument(string, dynamic)
name: The name of the argument to update.
value: The value to update the argument with.
Updates the argument with the specified name with the specified value. If an argument with the specified name isn't found, then it's created and added to the collection. void