コード例 #1
0
ファイル: MyListener.cs プロジェクト: lulzzz/csl-vmstats-akka
        public override void EnterValue_name(VmstatsParser.Value_nameContext context)
        {
            Console.WriteLine("EnterValue_name - {0}", context.Payload.GetChild(0));

            // Save the name of the current value
            currentValue = context.Payload.GetChild(0).ToString();
        }
コード例 #2
0
ファイル: MyListener.cs プロジェクト: lulzzz/csl-vmstats-akka
        public override void ExitValue_name(VmstatsParser.Value_nameContext context)
        {
            Console.WriteLine("ExitValue_name");

            // Add the parameter and value to the set of current parameters
            if (!currentParameters.TryAdd(currentParameterName, currentValue))
            {
                // Log an error
                _log.Error("Error in DSL for transform name - {0}. Trying to add parameter with name={1} and value={2}."
                           + "Likely cause parameter with same name already exists for transform.", currentTransformName, currentParameterName, currentValue);
            }
        }
コード例 #3
0
 /// <summary>
 /// Exit a parse tree produced by <see cref="VmstatsParser.value_name"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitValue_name([NotNull] VmstatsParser.Value_nameContext context)
 {
 }
コード例 #4
0
 /// <summary>
 /// Visit a parse tree produced by <see cref="VmstatsParser.value_name"/>.
 /// <para>
 /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/>
 /// on <paramref name="context"/>.
 /// </para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 /// <return>The visitor result.</return>
 public virtual Result VisitValue_name([NotNull] VmstatsParser.Value_nameContext context)
 {
     return(VisitChildren(context));
 }