Example #1
0
 void Variables_ResolveFunction(object sender, ResolveFunctionEventArgs e)
 {
     if (e.FunctionName == "IsDefined")
     {
         e.ReturnType = typeof(bool);
         return;
     }
     Element proc = m_worldModel.Procedure(e.FunctionName);
     if (proc != null)
     {
         e.ReturnType = WorldModel.ConvertTypeNameToType(proc.Fields[FieldDefinitions.ReturnType]);
     }
 }
Example #2
0
        void Variables_ResolveFunction(object sender, ResolveFunctionEventArgs e)
        {
            if (e.FunctionName == "IsDefined")
            {
                e.ReturnType = typeof(bool);
                return;
            }
            Element proc = m_worldModel.Procedure(e.FunctionName);

            if (proc != null)
            {
                e.ReturnType = WorldModel.ConvertTypeNameToType(proc.Fields[FieldDefinitions.ReturnType]);
            }
        }
Example #3
0
 private void OnResolveFunction(object sender, ResolveFunctionEventArgs e)
 {
     switch (e.FunctionName) {
         case "func1":
             e.ReturnType = typeof(int);
             break;
         case "func2":
             e.ReturnType = typeof(double);
             break;
     }
 }
Example #4
0
 private void TestValidExpressions_OnResolveFunction(object sender, ResolveFunctionEventArgs e)
 {
     e.ReturnType = typeof(int);
 }
Example #5
0
 private void TestValidExpressions_OnResolveFunction(object sender, ResolveFunctionEventArgs e)
 {
     e.ReturnType = typeof(int);
 }