Author Message
Smoroffko
Joined: Nov 5, 2015
Messages: 22
Offline
I am working in C# trying to extract all the steps along with comments in a vector. I am able to get the first part of each step and understand how to get sub steps. However, I am not sure how to dynamically retrieve these steps so I don't have to write a scenario for each case. An example would be for the "check" step and then the remaining values are dictated based on the remaining variables.


case "check":
var checkValue = vector.Check.Where(x => x.position == step.position).ToArray()[0].Value;

if(checkValue == "skill")
{
Console.WriteLine(string.Format("Step Position: {0} Step Value: {1} {2} {3} Priority {4} if {5} > {6} {7}", step.position, step.Value, checkValue,
vector.CheckSkillOrSplit.Where(x => x.position == step.position).ToArray()[0].Value, vector.CheckSkillPriority.Where(x => x.position == step.position).ToArray()[0].Value,
vector.CheckOptions.Where(x => x.position == step.position).ToArray()[0].Value, vector.CheckAvilableAgentsStaffed.Where(x => x.position == step.position).ToArray()[0].Value,
vector.CheckSkillPriority.Where(x => x.position == step.position).ToArray()[0].Value));
}
break;


Is there a way I can dynamically get all info for each line?

Note - this is very rough code because I keep making changes trying the best way to get my desired results lol.
Go to:   
Mobile view