public FileWrapper(string path) // : base(path) { _file = new File(path); //Thumbnail = new WeakThumbnail(path); //Thumbnail.SourceUpdated += () => { PropChanged(nameof(Thumbnail)); }; Name = IoObject.GetName(path); }
public static IoObject slotCallMessage(IoObject target, IoObject locals, IoObject message) { // setSlot("A", Object clone do(setSlot("B", method(call message)))) IoCall self = target as IoCall; return(self.msg); }
public FileWrapper(string path, string msgText) // : base(path) { _file = new File(path); //Thumbnail = new WeakThumbnail(path); //Thumbnail.SourceUpdated += () => { PropChanged(nameof(Thumbnail)); }; Name = IoObject.GetName(path); Options.MessageOptions.MessageText = msgText; }
//public override IoObject clone(IoState state) //{ // IoObject proto = state.protoWithInitFunc(name); // IoCall result = new IoCall(); // uniqueIdCounter++; // result.uniqueId = uniqueIdCounter; // result.state = state; // result.createProtos(); // result.createSlots(); // result.protos.Add(proto); // return result; //} public static IoObject with(IoState state, IoObject sender, IoObject target, IoObject message, IoObject slotContext, IoObject activated, IoObject coro) { IoCall call = IoCall.createObject(state); call.sender = sender; call.target = target; call.msg = message; call.slotContext = slotContext; call.activated = activated; call.coroutine = coro; call.stopStatus = IoCallStatus.MESSAGE_STOP_STATUS_NORMAL; return call; }
//public override IoObject clone(IoState state) //{ // IoObject proto = state.protoWithInitFunc(name); // IoCall result = new IoCall(); // uniqueIdCounter++; // result.uniqueId = uniqueIdCounter; // result.state = state; // result.createProtos(); // result.createSlots(); // result.protos.Add(proto); // return result; //} public static IoObject with(IoState state, IoObject sender, IoObject target, IoObject message, IoObject slotContext, IoObject activated, IoObject coro) { IoCall call = IoCall.createObject(state); call.sender = sender; call.target = target; call.msg = message; call.slotContext = slotContext; call.activated = activated; call.coroutine = coro; call.stopStatus = IoCallStatus.MESSAGE_STOP_STATUS_NORMAL; return(call); }
public IResult Implement(ISynchronousContext context) { try { context.LogService.Info("Started restservice"); string code = context.RequestBody; if (String.IsNullOrWhiteSpace(code)) { return(context.CreateErrorResult(500, "You must supply a body for the code")); } IoState state = new IoState(); state.processBootstrap(); IoObject returnValue = state.onDoCStringWithLabel(state.lobby, code.Trim(), "dotnet:"); context.LogService.Info("Finished restservice"); if (returnValue == null) { return(context.CreateResult("Return value was null")); } if (returnValue is IoNumber) { return(context.CreateResult((returnValue as IoNumber).asDouble())); } return(context.CreateResult(returnValue.ToString())); } catch (Exception e) { return(context.CreateErrorResult(500, e.Message)); } }
public static IoObject slotTarget(IoObject target, IoObject locals, IoObject message) { IoCall self = target as IoCall; return self.target; }
public static IoObject slotSender(IoObject target, IoObject locals, IoObject message) { IoCall self = target as IoCall; return self.sender; }
public static IoObject slotCallMessage(IoObject target, IoObject locals, IoObject message) { // setSlot("A", Object clone do(setSlot("B", method(call message)))) IoCall self = target as IoCall; return self.msg; }
public static IoObject slotTarget(IoObject target, IoObject locals, IoObject message) { IoCall self = target as IoCall; return(self.target); }
public static IoObject slotSender(IoObject target, IoObject locals, IoObject message) { IoCall self = target as IoCall; return(self.sender); }