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]); } }
private void OnResolveFunction(object sender, ResolveFunctionEventArgs e) { switch (e.FunctionName) { case "func1": e.ReturnType = typeof(int); break; case "func2": e.ReturnType = typeof(double); break; } }
private void TestValidExpressions_OnResolveFunction(object sender, ResolveFunctionEventArgs e) { e.ReturnType = typeof(int); }