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); }
public void ReadReport(ReadReportCallback callback) { ReadReportDelegate readReportDelegate = ReadReport; HidAsyncState @object = new HidAsyncState(readReportDelegate, callback); readReportDelegate.BeginInvoke(EndReadReport, @object); }
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); }
public void ReadReport(ReadReportCallback callback) { ReadReport(callback, 0); }
public void ReadReport(ReadReportCallback callback) { throw new NotImplementedException(); }