internal static Pon FromPixelportPon(PixelportPon value, bool owned, Pon parent) { if (value == IntPtr.Zero) { return null; } else { return new Pon(value, owned, parent); } }
public Stream Stream(Pon request) { var channelId = Lib.pixelport_send_message(this.instance, request.value); var stream = new Stream { channelId = channelId, app = this }; this.channels[channelId] = (message) => { stream.SendMessage(message); }; return stream; }
public static Pon Call(string functionName, Pon arg) { return FromPixelportPon(Lib.pixelport_new_call_pon(functionName, arg.value), true, null); }
public Task<Pon> Request(Pon request) { var channelId = Lib.pixelport_send_message(this.instance, request.value); var tcs = new TaskCompletionSource<Pon>(); this.channels[channelId] = (message) => { this.channels.Remove(channelId); tcs.SetResult(message); }; return tcs.Task; }
public App(Pon options) { this.instance = Lib.pixelport_new(options.value); }
internal void SendMessage(Pon message) { Message(message); }
private Pon(PixelportPon value, bool owned, Pon parent) { this.value = value; this.owned = owned; this.parent = parent; }
public void Push(Pon item) { Lib.pixelport_push_pon_array_item(this.value, item.value); }