Exemplo n.º 1
0
        public void Compile(CmlContext context, CmlScriptRequest request, CmlScriptValue this_value)
        {
            GetArguments().Compile(context, request, this_value);

            value = null;
            if (GetArguments().GetNumberExpressions() == 0)
            {
                value = this_value.GetIndirectValue(GetId());
            }

            if (value == null)
            {
                value = this_value.GetIndirectMethodInvokation(GetId(), GetArguments().GetValues())
                        .AssertNotNull(() => new CmlRuntimeError_InvalidIdForTypeException("function", GetId(), this_value.GetValueType()));
            }
        }
Exemplo n.º 2
0
 protected override CmlScriptValue CompileValue(CmlContext context, CmlScriptRequest request, CmlScriptValue this_value)
 {
     return(this_value.GetIndirectValue(GetId())
            .AssertNotNull(() => new CmlRuntimeError_InvalidIdForTypeException("value", GetId(), this_value.GetValueType())));
 }