public Event(bps_event_completion_func completion_function = null) { if (completion_function == null) completion_function = this.CallBackCreateEvent; CreateEvent(completion_function); }
private void CreateEvent(bps_event_completion_func completion_function) { uint code = 0; uint domain = (uint)PlatformServices.RegisterDomain(); if (bps_event_create(out _handle, domain, code, _payload, completion_function) != (int)BPSResponse.BPS_SUCCESS) throw new Exception("Unable to create event."); }
static extern int bps_event_create(out IntPtr _event, uint domain, uint code, bps_event_payload_t payload_ptr, bps_event_completion_func completion_function);