示例#1
0
文件: Event.cs 项目: gatm50/monoberry
        public Event(bps_event_completion_func completion_function = null)
        {
            if (completion_function == null)
                completion_function = this.CallBackCreateEvent;

            CreateEvent(completion_function);
        }
示例#2
0
文件: Event.cs 项目: gatm50/monoberry
 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.");
 }
示例#3
0
文件: Event.cs 项目: gatm50/monoberry
 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);