示例#1
0
        public void ReadReport(ReadReportCallback callback)
        {
            var readReportDelegate = new ReadReportDelegate(ReadReport);
            var asyncState         = new HidAsyncState(readReportDelegate, callback);

            readReportDelegate.BeginInvoke(EndReadReport, asyncState);
        }
        public void FastReadReport(ReadReportCallback callback, int timeout)
        {
            var readReportDelegate = new ReadReportDelegate(FastReadReport);
            var asyncState         = new HidAsyncState(readReportDelegate, callback);

            readReportDelegate.BeginInvoke(timeout, EndReadReport, asyncState);
        }
示例#3
0
        public void ReadReport(ReadReportCallback callback)
        {
            ReadReportDelegate readReportDelegate = ReadReport;
            HidAsyncState      @object            = new HidAsyncState(readReportDelegate, callback);

            readReportDelegate.BeginInvoke(EndReadReport, @object);
        }
示例#4
0
        protected static void EndReadReport(IAsyncResult ar)
        {
            HidAsyncState      hidAsyncState      = (HidAsyncState)ar.AsyncState;
            ReadReportDelegate readReportDelegate = (ReadReportDelegate)hidAsyncState.CallerDelegate;
            ReadReportCallback readReportCallback = (ReadReportCallback)hidAsyncState.CallbackDelegate;
            HidReport          report             = readReportDelegate.EndInvoke(ar);

            readReportCallback?.Invoke(report);
        }
 public void FastReadReport(ReadReportCallback callback)
 {
     FastReadReport(callback, 0);
 }
示例#6
0
 public void ReadReport(ReadReportCallback callback)
 {
     ReadReport(callback, 0);
 }
示例#7
0
 public void ReadReport(ReadReportCallback callback)
 {
     var readReportDelegate = new ReadReportDelegate(ReadReport);
     var asyncState = new HidAsyncState(readReportDelegate, callback);
     readReportDelegate.BeginInvoke(EndReadReport, asyncState);
 }
示例#8
0
 public void FastReadReport(ReadReportCallback callback, int timeout)
 {
     var readReportDelegate = new ReadReportDelegate(FastReadReport);
     var asyncState = new HidAsyncState(readReportDelegate, callback);
     readReportDelegate.BeginInvoke(timeout, EndReadReport, asyncState);
 }
示例#9
0
 public void FastReadReport(ReadReportCallback callback)
 {
     FastReadReport(callback, 0);
 }
示例#10
0
 public void ReadReport(ReadReportCallback callback)
 {
     throw new NotImplementedException();
 }
示例#11
0
 public void ReadReport(ReadReportCallback callback)
 {
     ReadReport(callback, 0);
 }