Ejemplo n.º 1
0
		internal static Pon FromPixelportPon(PixelportPon value, bool owned, Pon parent) {
			if (value == IntPtr.Zero) {
				return null;
			} else {
				return new Pon(value, owned, parent);
			}
		}
Ejemplo n.º 2
0
		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;
		}
Ejemplo n.º 3
0
		public static Pon Call(string functionName, Pon arg) {
			return FromPixelportPon(Lib.pixelport_new_call_pon(functionName, arg.value), true, null);
		}
Ejemplo n.º 4
0
		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;
		}
Ejemplo n.º 5
0
		public App(Pon options) {
			this.instance = Lib.pixelport_new(options.value);
		}
Ejemplo n.º 6
0
		internal void SendMessage(Pon message) {
			Message(message);
		}
Ejemplo n.º 7
0
		private Pon(PixelportPon value, bool owned, Pon parent) {
			this.value = value;
			this.owned = owned;
			this.parent = parent;
		}
Ejemplo n.º 8
0
		public void Push(Pon item) {
			Lib.pixelport_push_pon_array_item(this.value, item.value);
		}