コード例 #1
0
ファイル: IoCall.cs プロジェクト: MilkTool/io-clr
        public override IoObject proto(IoState state)
        {
            IoCall pro = new IoCall();

            pro.state = state;
            pro.createSlots();
            pro.createProtos();
            state.registerProtoWithFunc(name, new IoStateProto(pro.name, pro, new IoStateProtoFunc(pro.proto)));
            pro.protos.Add(state.protoWithInitFunc("Object"));

            IoCFunction[] methodTable = new IoCFunction[] {
                new IoCFunction("sender", new IoMethodFunc(IoCall.slotSender)),
                new IoCFunction("target", new IoMethodFunc(IoCall.slotTarget)),
                new IoCFunction("message", new IoMethodFunc(IoCall.slotCallMessage)),
            };

            pro.addTaglessMethodTable(state, methodTable);
            return(pro);
        }
コード例 #2
0
ファイル: IoCall.cs プロジェクト: devaspot/io
        public override IoObject proto(IoState state)
        {
            IoCall pro = new IoCall();
            pro.state = state;
            pro.createSlots();
            pro.createProtos();
            state.registerProtoWithFunc(name, new IoStateProto(pro.name, pro, new IoStateProtoFunc(pro.proto)));
            pro.protos.Add(state.protoWithInitFunc("Object"));

            IoCFunction[] methodTable = new IoCFunction[] {
                new IoCFunction("sender", new IoMethodFunc(IoCall.slotSender)),
                new IoCFunction("target", new IoMethodFunc(IoCall.slotTarget)),
                new IoCFunction("message", new IoMethodFunc(IoCall.slotCallMessage)),
            };

            pro.addTaglessMethodTable(state, methodTable);
            return pro;
        }