private void AddChildren(ExtractionConfiguration extractionConfiguration, DescendancyList descendancy) { HashSet <object> children = new HashSet <object>(); var parameters = AllGlobalExtractionFilterParameters.Where(p => p.ExtractionConfiguration_ID == extractionConfiguration.ID) .ToArray(); if (parameters.Any()) { var parameterNode = new ParametersNode(extractionConfiguration, parameters); children.Add(parameterNode); } //if it has a cohort if (extractionConfiguration.Cohort_ID != null) { var cohort = Cohorts.Single(c => c.ID == extractionConfiguration.Cohort_ID); children.Add(new LinkedCohortNode(extractionConfiguration, cohort)); } //if it has extractable datasets add those foreach (SelectedDataSets ds in GetDatasets(extractionConfiguration)) { children.Add(ds); AddChildren(ds, descendancy.Add(ds)); } AddToDictionaries(children, descendancy); }
public FunctionNode(Node name,Node paraNode,Node func) : base() { this.name = (SymbolNode)name; this.paraNode = (ParametersNode)paraNode; this.func = (BlockNode)func; this.paraNode.SetBlock(this.func); }
public ParametersNodeMenu(RDMPContextMenuStripArgs args, ParametersNode parameterNode) : base(args, parameterNode) { var filter = parameterNode.Collector as ExtractionFilter; if (filter != null) { Items.Add(new ToolStripMenuItem("Add New 'Known Good Value(s) Set'", GetImage(RDMPConcept.ExtractionFilterParameterSet, OverlayKind.Add), (s, e) => AddParameterValueSet(filter))); } }
public string DescribeProblem(ParametersNode parameterNode) { var emptyParams = parameterNode.Parameters.Where(p => string.IsNullOrWhiteSpace(p.Value)).ToArray(); if (emptyParams.Any()) { return("The following parameters do not have values defined:" + string.Join(",", emptyParams.Select(p => p.ParameterName))); } return(null); }
//仮引数ノードを構成する。 private Node ParseParameters() { ParametersNode parameters = new ParametersNode(); if(tokenType != TokenType.OpenParen){ throw new UnexpectedException(tokenType,"OpenParen"); } GetToken (); while(tokenType != TokenType.CloseParen){ if(tokenType != TokenType.Symbol){ throw new UnexpectedException(tokenType,"Symbol"); } Node n = ParseSymbol(); parameters.Add(n); if(tokenType == TokenType.Comma){ GetToken(); } } GetToken (); return parameters; }