Пример #1
0
        public static bool SystemPairSetCdr(out object answer, object arg, object newValue)
        {
            ISystemPair systemPair = arg as ISystemPair;

            answer = systemPair.SystemPairCdr;
            systemPair.SystemPairCdr = newValue;
            return(false);
        }
Пример #2
0
        public static bool SystemPairCdr(out object answer, object arg)
        {
            ISystemPair systemPair = arg as ISystemPair;

            if (systemPair == null)
            {
                throw new NotImplementedException();
            }
            else
            {
                answer = systemPair.SystemPairCdr;
                return(false);
            }
        }
Пример #3
0
        public static bool SystemPairCar(out object answer, object arg)
        {
            ISystemPair systemPair = arg as ISystemPair;

            if (systemPair != null)
            {
                answer = systemPair.SystemPairCar;
            }
            else
            {
                // special case strings to act like symbols
                // with a print ratorName in the system pair car.
                string sarg = arg as string;
                if (sarg == null)
                {
                    throw new NotImplementedException();
                }
                else
                {
                    answer = sarg.ToCharArray();
                }
            }
            return(false);
        }