public static CompileTool Parse(GenericStructure gs) { var tool = new CompileTool { Name = gs["Name"] ?? "", Description = gs["Description"] ?? "", Order = gs.PropertyInteger("Order") }; var parameters = gs.GetChildren("Parameter"); tool.Parameters.AddRange(parameters.Select(CompileParameter.Parse)); return tool; }
public static CompileTool Parse(GenericStructure gs) { var tool = new CompileTool { Name = gs["Name"] ?? "", Description = gs["Description"] ?? "", Order = gs.PropertyInteger("Order"), Enabled = gs.PropertyBoolean("Enabled", true) }; var parameters = gs.GetChildren("Parameter"); tool.Parameters.AddRange(parameters.Select(CompileParameter.Parse)); return(tool); }