Exemplo n.º 1
0
        void Variables_InvokeFunction(object sender, InvokeFunctionEventArgs e)
        {
            if (e.FunctionName == "IsDefined")
            {
                e.Result = m_context.Parameters.ContainsKey((string)e.Arguments[0]);
                return;
            }
            Element proc = m_worldModel.Procedure(e.FunctionName);
            Parameters parameters = new Parameters();
            int cnt = 0;
            // TO DO: Check number of parameters matches
            foreach (object val in e.Arguments)
            {
                parameters.Add((string)proc.Fields[FieldDefinitions.ParamNames][cnt], val);
                cnt++;
            }

            e.Result = m_worldModel.RunProcedure(e.FunctionName, parameters, true);
        }
Exemplo n.º 2
0
        void Variables_InvokeFunction(object sender, InvokeFunctionEventArgs e)
        {
            if (e.FunctionName == "IsDefined")
            {
                e.Result = m_context.Parameters.ContainsKey((string)e.Arguments[0]);
                return;
            }
            Element    proc       = m_worldModel.Procedure(e.FunctionName);
            Parameters parameters = new Parameters();
            int        cnt        = 0;

            // TO DO: Check number of parameters matches
            foreach (object val in e.Arguments)
            {
                parameters.Add((string)proc.Fields[FieldDefinitions.ParamNames][cnt], val);
                cnt++;
            }

            e.Result = m_worldModel.RunProcedure(e.FunctionName, parameters, true);
        }
Exemplo n.º 3
0
 private void OnInvokeFunction(object sender, InvokeFunctionEventArgs e)
 {
     e.Result = e.Arguments[0];
 }
Exemplo n.º 4
0
 private void TestValidExpressions_OnInvokeFunction(object sender, InvokeFunctionEventArgs e)
 {
     e.Result = 100;
 }
Exemplo n.º 5
0
 private void TestValidExpressions_OnInvokeFunction(object sender, InvokeFunctionEventArgs e)
 {
     e.Result = 100;
 }