AjTalk.Language.BaseBehavior.SendMessageToNilObject C# (CSharp) Метод

SendMessageToNilObject() публичный Метод

public SendMessageToNilObject ( System.Machine machine, string msgname, object args ) : object
machine System.Machine
msgname string
args object
Результат object
        public object SendMessageToNilObject(Machine machine, string msgname, object[] args)
        {
            IMethod mth = this.GetInstanceMethod(msgname);

            if (mth != null)
                    return mth.Execute(machine, null, args);

            mth = this.GetInstanceMethod("doesNotUnderstand:with:");

            if (mth != null)
                return mth.Execute(machine, null, new object[] { msgname, args });

            throw new InvalidProgramException(string.Format("Does not understand {0}", msgname));
        }