public void AddToALSymbol(ALSymbolInformation symbol, ALSymbolKind collectionKind, string collectionName, ALSymbolKind firstItemSymbolKind) { if (this.Count > 0) { ALSymbolInformation collectionSymbol = symbol; if (!String.IsNullOrWhiteSpace(collectionName)) { collectionSymbol = new ALSymbolInformation(collectionKind, collectionName); symbol.AddChildSymbol(collectionSymbol); } for (int i = 0; i < this.Count; i++) { if ((i == 0) && (firstItemSymbolKind != ALSymbolKind.Undefined)) { ALSymbolInformation itemSymbol = this[i].ToALSymbol(); itemSymbol.kind = firstItemSymbolKind; collectionSymbol.AddChildSymbol(itemSymbol); } else { collectionSymbol.AddChildSymbol(this[i].ToALSymbol()); } } } }
protected override void AddChildALSymbols(ALSymbolInformation symbol) { this.DataItems?.AddToALSymbol(symbol, ALSymbolKind.ReportDataSetSection, "dataset"); if (this.RequestPage != null) { symbol.AddChildSymbol(this.RequestPage.ToALSymbol()); } base.AddChildALSymbols(symbol); }
protected void ProcessChildSyntaxNode(SyntaxTree syntaxTree, ALSymbolInformation parent, SyntaxNode node) { //check if node is an attribute of parent symbol if (!ProcessSyntaxNodeAttribute(syntaxTree, parent, node)) { ALSymbolInformation symbolInfo = CreateSymbolInfo(syntaxTree, node); if (IsValidChildSymbolInformation(symbolInfo)) { if (((parent.childSymbols == null) || (parent.childSymbols.Count == 0)) && (symbolInfo.kind == ALSymbolKind.Key)) { symbolInfo.kind = ALSymbolKind.PrimaryKey; } parent.AddChildSymbol(symbolInfo); } } }
protected void ProcessVariableListDeclarationNode(SyntaxTree syntaxTree, ALSymbolInformation parent, VariableListDeclarationSyntax node) { string typeName = node.Type.ToFullString(); string elementDataType = typeName; if (node.Type.DataType != null) { elementDataType = node.Type.DataType.ToString(); } foreach (VariableDeclarationNameSyntax nameNode in node.VariableNames) { ALSymbolInformation variableSymbol = CreateSymbolInfo(syntaxTree, nameNode); //new ALSymbolInformation(ALSymbolKind.VariableDeclaration, variableName); variableSymbol.fullName = ALSyntaxHelper.EncodeName(variableSymbol.name) + ": " + typeName; variableSymbol.subtype = typeName; variableSymbol.elementsubtype = elementDataType; parent.AddChildSymbol(variableSymbol); } }