Added nodes related to the list and array operations
Some checks failed
Build / build (push) Has been cancelled
Some checks failed
Build / build (push) Has been cancelled
This commit is contained in:
@@ -153,13 +153,116 @@ namespace Nodify.Calculator
|
||||
systemNodes.Add(debugAndCreateModels);
|
||||
systemNodes.Add(jsonParseNode);
|
||||
systemNodes.Add(splitNode);
|
||||
systemNodes.Add(takeNode);
|
||||
systemNodes.Add(forEachNode);
|
||||
systemNodes.Add(assertNode);
|
||||
systemNodes.Add(stringConcatNode);
|
||||
return systemNodes;
|
||||
}
|
||||
|
||||
public static List<OperationInfoViewModel> GetListNodes()
|
||||
{
|
||||
var listNodes = new List<OperationInfoViewModel>();
|
||||
|
||||
var listAdd = new OperationInfoViewModel
|
||||
{
|
||||
Title = "List Add",
|
||||
Type = OperationType.System,
|
||||
sysOp = SystemOperations.LIST_ADD,
|
||||
IsFlowNode = true
|
||||
};
|
||||
listAdd.Input.Add("List");
|
||||
listAdd.Input.Add("Item");
|
||||
|
||||
var listRemove = new OperationInfoViewModel
|
||||
{
|
||||
Title = "List Remove",
|
||||
Type = OperationType.System,
|
||||
sysOp = SystemOperations.LIST_REMOVE,
|
||||
IsFlowNode = true
|
||||
};
|
||||
listRemove.Input.Add("List");
|
||||
listRemove.Input.Add("Index");
|
||||
|
||||
var listUpdate = new OperationInfoViewModel
|
||||
{
|
||||
Title = "List Update",
|
||||
Type = OperationType.System,
|
||||
sysOp = SystemOperations.LIST_UPDATE,
|
||||
IsFlowNode = true
|
||||
};
|
||||
listUpdate.Input.Add("List");
|
||||
listUpdate.Input.Add("Index");
|
||||
listUpdate.Input.Add("Item");
|
||||
|
||||
var listGet = new OperationInfoViewModel
|
||||
{
|
||||
Title = "List Get",
|
||||
Type = OperationType.System,
|
||||
sysOp = SystemOperations.LIST_GET,
|
||||
IsFlowNode = false
|
||||
};
|
||||
listGet.Input.Add("List");
|
||||
listGet.Input.Add("Index");
|
||||
|
||||
var listCount = new OperationInfoViewModel
|
||||
{
|
||||
Title = "List Count",
|
||||
Type = OperationType.System,
|
||||
sysOp = SystemOperations.LIST_COUNT,
|
||||
IsFlowNode = false
|
||||
};
|
||||
listCount.Input.Add("List");
|
||||
|
||||
var listContains = new OperationInfoViewModel
|
||||
{
|
||||
Title = "List Contains",
|
||||
Type = OperationType.System,
|
||||
sysOp = SystemOperations.LIST_CONTAINS,
|
||||
IsFlowNode = false
|
||||
};
|
||||
listContains.Input.Add("List");
|
||||
listContains.Input.Add("Item");
|
||||
|
||||
var listClear = new OperationInfoViewModel
|
||||
{
|
||||
Title = "List Clear",
|
||||
Type = OperationType.System,
|
||||
sysOp = SystemOperations.LIST_CLEAR,
|
||||
IsFlowNode = true
|
||||
};
|
||||
listClear.Input.Add("List");
|
||||
|
||||
// Also include existing list-related nodes
|
||||
var takeNode = new OperationInfoViewModel
|
||||
{
|
||||
Title = "TAKE",
|
||||
Type = OperationType.System,
|
||||
sysOp = SystemOperations.TAKE,
|
||||
IsFlowNode = false
|
||||
};
|
||||
takeNode.Input.Add("List");
|
||||
|
||||
var forEachNode = new OperationInfoViewModel
|
||||
{
|
||||
Title = "ForEach",
|
||||
Type = OperationType.System,
|
||||
sysOp = SystemOperations.FOREACH,
|
||||
IsFlowNode = true
|
||||
};
|
||||
forEachNode.Input.Add("List");
|
||||
|
||||
listNodes.Add(takeNode);
|
||||
listNodes.Add(forEachNode);
|
||||
listNodes.Add(listAdd);
|
||||
listNodes.Add(listRemove);
|
||||
listNodes.Add(listUpdate);
|
||||
listNodes.Add(listGet);
|
||||
listNodes.Add(listCount);
|
||||
listNodes.Add(listContains);
|
||||
listNodes.Add(listClear);
|
||||
|
||||
return listNodes;
|
||||
}
|
||||
|
||||
public static List<OperationInfoViewModel> GetOperationsInfo(Type container)
|
||||
{
|
||||
List<OperationInfoViewModel> result = new List<OperationInfoViewModel>();
|
||||
|
||||
Reference in New Issue
Block a user