Пример #1
0
        /// <summary>
        /// Generates an incoming edge attribute
        /// </summary>
        /// <param name="aIncomingEdge">The incoming edge definition by the gql</param>
        /// <returns>An incoming edge predefinition</returns>
        private IncomingEdgePredefinition GenerateAIncomingEdge(IncomingEdgeDefinition aIncomingEdge)
        {
            IncomingEdgePredefinition result = new IncomingEdgePredefinition(aIncomingEdge.AttributeName,
                                                                             aIncomingEdge.TypeName,
                                                                             aIncomingEdge.TypeAttributeName);

            return(result);
        }
Пример #2
0
        public void Init(ParsingContext context, ParseTreeNode parseNode)
        {
            #region Extract type and attribute

            //if (parseNode.ChildNodes.Count != 4)
            //    throw new Exception("This is not a [Type].[Attribute] definition: " + parseNode.ChildNodes[0].ToString());

            _TypeName          = parseNode.ChildNodes[0].Token.ValueString;
            _TypeAttributeName = parseNode.ChildNodes[2].Token.ValueString;

            #endregion

            _AttributeName = parseNode.ChildNodes[3].Token.ValueString;

            BackwardEdgeDefinition = new IncomingEdgeDefinition(_AttributeName, _TypeName, _TypeAttributeName);
        }