• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# INodeVisitor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中INodeVisitor的典型用法代码示例。如果您正苦于以下问题:C# INodeVisitor类的具体用法?C# INodeVisitor怎么用?C# INodeVisitor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



INodeVisitor类属于命名空间,在下文中一共展示了INodeVisitor类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Accept

 public override void Accept(INodeVisitor visitor)
 {
     visitor.Visit(this);
     foreach (var andNode in Children)
         foreach (var child in andNode.Children)
             child.Accept(visitor);
 }
开发者ID:whitten,项目名称:Pliant,代码行数:7,代码来源:IntermediateNode.cs


示例2: Accept

        public override void Accept(INodeVisitor visitor)
        {
            LeftNode.Accept(visitor);
            RightNode.Accept(visitor);

            visitor.Visit(this);
        }
开发者ID:dubik,项目名称:csharprpp,代码行数:7,代码来源:Program.cs


示例3: ExpressionNodeExecuterBase

        /// <summary>
        /// Initializes a new instance of <see cref="ExpressionNodeExecuterBase"/> class.
        /// </summary>
        /// <param name="nodeCompiler">The node compiler.</param>
        /// <exception cref="System.ArgumentException">Parameter 'nodeCompiler' should contain a value.;nodeCompiler</exception>
        protected ExpressionNodeExecuterBase(INodeVisitor nodeCompiler)
        {
            if (nodeCompiler == null)
                throw new ArgumentException("Parameter 'nodeCompiler' should contain a value.", "nodeCompiler");

            NodeCompiler = nodeCompiler;
        }
开发者ID:mparsin,项目名称:Elements,代码行数:12,代码来源:ExpressionNodeExecuterBase.cs


示例4: Accept

 public override void Accept(INodeVisitor visitor)
 {
     LeftOperand.Accept(visitor);
     visitor.VisitAfterLHS(this);
     RightOperand.Accept(visitor);
     visitor.Visit(this);
 }
开发者ID:Lateks,项目名称:MiniJavaCompiler,代码行数:7,代码来源:BinaryOperatorExpression.cs


示例5: Accept

 public override void Accept(INodeVisitor visitor)
 {
     if (ArraySize != null)
     {
         ArraySize.Accept(visitor);
     }
     visitor.Visit(this);
 }
开发者ID:Lateks,项目名称:MiniJavaCompiler,代码行数:8,代码来源:InstanceCreationExpression.cs


示例6: Accept

 public override void Accept(INodeVisitor visitor)
 {
     if (visitor.Visit(this))
      {
     foreach (Node childNode in childNodes)
        childNode.Accept(visitor);
      }
 }
开发者ID:ldematte,项目名称:BlenXVSP,代码行数:8,代码来源:PT_Pi_Node.cs


示例7: Accept

 public override void Accept(INodeVisitor visitor)
 {
     visitor.Visit(this);
     LoopBody.Accept(visitor);
     visitor.VisitAfterBody(this);
     LoopCondition.Accept(visitor);
     visitor.Exit(this);
 }
开发者ID:Lateks,项目名称:MiniJavaCompiler,代码行数:8,代码来源:WhileStatement.cs


示例8: Accept

 public override void Accept(INodeVisitor visitor)
 {
     visitor.Visit(this);
     foreach (var statement in Statements)
     {
         statement.Accept(visitor);
     }
     visitor.Exit(this);
 }
开发者ID:Lateks,项目名称:MiniJavaCompiler,代码行数:9,代码来源:BlockStatement.cs


示例9: Accept

 public override void Accept(INodeVisitor visitor)
 {
     MethodOwner.Accept(visitor);
     foreach (var expr in CallParameters)
     {
         expr.Accept(visitor);
     }
     visitor.Visit(this);
 }
开发者ID:Lateks,项目名称:MiniJavaCompiler,代码行数:9,代码来源:MethodInvocation.cs


示例10: VisitNode

        public void VisitNode(INodeVisitor visitor, IList<Node> body, IList<Chunk> chunks)
        {
            visitor.Accept(body);

            var sectionVisitor = new ViewComponentSectionChunkBuilderVisitor();
            sectionVisitor.Accept(body);
            sections = sectionVisitor.Sections;
            attributes = sectionVisitor.Attributes;
        }
开发者ID:mgagne-atman,项目名称:Projects,代码行数:9,代码来源:ViewComponentExtension.cs


示例11: Accept

 public override void Accept(INodeVisitor visitor)
 {
     visitor.Visit(this);
     foreach (Declaration decl in Declarations)
     {
         decl.Accept(visitor);
     }
     visitor.Exit(this);
 }
开发者ID:Lateks,项目名称:MiniJavaCompiler,代码行数:9,代码来源:ClassDeclaration.cs


示例12: Accept

        public override void Accept(INodeVisitor visitor)
        {
            if (!visitor.BeforeVisit(this))
                return;

            this.Value.Accept(visitor);

            visitor.AfterVisit(this);
        }
开发者ID:TerrificNet,项目名称:TerrificNet,代码行数:9,代码来源:AttributeNode.cs


示例13: Accept

 public void Accept(INodeVisitor visitor)
 {
     MainClass.Accept(visitor);
     foreach (var aClass in Classes)
     {
         aClass.Accept(visitor);
     }
     visitor.Visit(this);
 }
开发者ID:Lateks,项目名称:MiniJavaCompiler,代码行数:9,代码来源:Program.cs


示例14: Accept

        public override void Accept(INodeVisitor visitor)
        {
            if (!visitor.BeforeVisit(this))
                return;

            foreach (var child in ChildNodes)
                child.Accept(visitor);

            visitor.AfterVisit(this);
        }
开发者ID:TerrificNet,项目名称:TerrificNet,代码行数:10,代码来源:Statement.cs


示例15: Accept

        public override void Accept(INodeVisitor visitor)
        {
            if (!visitor.BeforeVisit(this))
                return;

            foreach (var part in ContentParts)
                part.Accept(visitor);

            visitor.AfterVisit(this);
        }
开发者ID:TerrificNet,项目名称:TerrificNet,代码行数:10,代码来源:CompositeAttributeContent.cs


示例16: VisitNode

        public void VisitNode(INodeVisitor visitor, IList<Node> body, IList<Chunk> chunks)
        {
            Transform(Node, body);

            visitor.Accept(Node);
            visitor.Accept(body);
            if (!Node.IsEmptyElement)
            {
                visitor.Accept(new EndElementNode(Node.Name));
            }
        }
开发者ID:jennifersmith,项目名称:openrasta-sparkcodec,代码行数:11,代码来源:SparkExtensionBase.cs


示例17: Accept

 public override void Accept(INodeVisitor visitor)
 {
     Condition.Accept(visitor);
     visitor.VisitAfterCondition(this);
     ThenBranch.Accept(visitor);
     visitor.VisitAfterThenBranch(this);
     if (ElseBranch != null)
     {
         ElseBranch.Accept(visitor);
     }
     visitor.Exit(this);
 }
开发者ID:Lateks,项目名称:MiniJavaCompiler,代码行数:12,代码来源:IfStatement.cs


示例18: Accept

 public override void Accept(INodeVisitor visitor)
 {
     visitor.Visit(this);
     foreach (var decl in Formals)
     {
         decl.Accept(visitor);
     }
     foreach (var statement in MethodBody)
     {
         statement.Accept(visitor);
     }
     visitor.Exit(this);
 }
开发者ID:Lateks,项目名称:MiniJavaCompiler,代码行数:13,代码来源:MethodDeclaration.cs


示例19: VisitNode

        public void VisitNode(INodeVisitor visitor, IList<Node> body, IList<Chunk> chunks)
        {
            var registerTarget = string.Format(
                @"RegisterTarget(""{0}"", ""{1}"", ""{2}"", __target_{3});",
                _idAttribute.Value,
                _classAttribute != null ? _classAttribute.Value : "",
                _descriptionAttribute != null ? _descriptionAttribute.Value : "",
                _targetExtensionCount);

            if (_targetAttribute != null)
            {
                registerTarget +=
                    Environment.NewLine +
                    string.Format(
                        @"RegisterTarget(""{0}"", ""{1}"", null, null);",
                        _targetAttribute.Value,
                        _idAttribute.Value);
            }

            var beginLambda = string.Format(
                @"__target_{0} = () => {{",
                _targetExtensionCount);
            const string endLambda = "};";

            var startingTarget = string.Format(
                @"StartingTarget(""{0}"");",
                _idAttribute.Value);

            var nameAttribute = new AttributeNode("name", _idAttribute.QuotChar, _idAttribute.Nodes) { OriginalNode = _idAttribute };

            var macroAttributes = _targetElement.Attributes
                .Where(x => x != _idAttribute && x != _classAttribute && x != _descriptionAttribute)
                .Concat(new[] { nameAttribute })
                .ToList();
            var macroElement = new SpecialNode(new ElementNode("macro", macroAttributes, false));

            var onceAttribute = new AttributeNode("once", _idAttribute.QuotChar, _idAttribute.Nodes);
            var testElement = new SpecialNode(new ElementNode("test", new[] { onceAttribute }, false));

            macroElement.Body.Add(testElement);
            testElement.Body = body;
            testElement.Body.Insert(0, new StatementNode(startingTarget));

            visitor.Accept(new StatementNode(beginLambda));
            visitor.Accept(testElement);
            visitor.Accept(new StatementNode(endLambda));
            visitor.Accept(new StatementNode(registerTarget));
        }
开发者ID:Eilon,项目名称:sake,代码行数:48,代码来源:TargetExtension.cs


示例20: VisitNode

        public void VisitNode(INodeVisitor visitor, IList<Node> body, IList<Chunk> chunks)
        {
            if (visitor is ChunkBuilderVisitor)
            {
                var newNodes = new List<Node>();

                Utilities.AddApplyPathModifier(_mNode.Attributes, "action");
                HttpMethodOverride(body);

                if (validate)
                {

                    var idNode = _mNode.Attributes.SingleOrDefault(x => x.Name == "id");

                    var id = (idNode != null) ? idNode.Value : GenerateFormId();

                    _mNode.Attributes.Remove(_mNode.Attributes.FirstOrDefault(x => x.Name == Constants.VALIDATE_ATTRIBUTE));
                    newNodes.Add(_mNode);

                    var code = String.Format(Constants.HTML_GETCLIENTVALIDATIONJSON, id, outputStyle, modelName);

                    //For MVC we have to create MvcForm first
                    if (outputStyle.Equals(OutputStyle.MVC))
                    {
                        var codeForMvc = String.Format(Constants.CREATEMVCFORM, id);
                        newNodes.Add(new StatementNode(codeForMvc));
                    }
                    newNodes.AddRange(body);
                    newNodes.Add(new StatementNode(code));
                }
                else
                {
                    newNodes.Add(_mNode);
                    newNodes.AddRange(body);
                }

                newNodes.Add(new EndElementNode(_mNode.Name));

                // visit the new nodes normally
                visitor.Accept(newNodes);

                // keep the output chunks to render later
                _mChunks = chunks;
            }
        }
开发者ID:rsmolnikov,项目名称:spark,代码行数:45,代码来源:FormTagSparkExtension.cs



注:本文中的INodeVisitor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# INonceStore类代码示例发布时间:2022-05-24
下一篇:
C# INodePacketTranslator类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap