io.IoBlock.proto C# (CSharp) Method

proto() public method

public proto ( IoState state ) : IoObject
state IoState
return IoObject
        public override IoObject proto(IoState state)
        {
            IoBlock pro = new IoBlock();
            pro.state = state;
            pro.createSlots();
            pro.createProtos();
            pro.containedMessage = state.nilMessage;
            pro.argNames = new IoObjectArrayList();
            state.registerProtoWithFunc(name, new IoStateProto(name, pro, new IoStateProtoFunc(this.proto)));
            pro.protos.Add(state.protoWithInitFunc("Object"));

            IoCFunction[] methodTable = new IoCFunction[] {
                new IoCFunction("call", new IoMethodFunc(IoBlock.slotCall)),
                new IoCFunction("code", new IoMethodFunc(IoBlock.slotCode)),
                new IoCFunction("block", new IoMethodFunc(IoBlock.slotBlock)),
                new IoCFunction("method", new IoMethodFunc(IoBlock.slotMethod)),
            };

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

Usage Example

Ejemplo n.º 1
0
 // Prototypes and Clone
 public static new IoBlock createProto(IoState state)
 {
     IoBlock number = new IoBlock();
     return number.proto(state) as IoBlock;
 }
All Usage Examples Of io.IoBlock::proto