Exemplo n.º 1
0
        public object ConvertTo(string kind, bool signalCondition, string conversionMethod, IokeObject message, IokeObject context)
        {
            object result = data.ConvertTo(this, kind, false, conversionMethod, message, context);

            if (result == null)
            {
                if (conversionMethod != null && FindCell(this, conversionMethod) != context.runtime.nul)
                {
                    IokeObject msg = context.runtime.NewMessage(conversionMethod);
                    return(Interpreter.Send(msg, context, this));
                }
                if (signalCondition)
                {
                    return(data.ConvertTo(this, kind, true, conversionMethod, message, context));
                }
                return(context.runtime.nul);
            }
            return(result);
        }