Esempio n. 1
0
        Task<int> IHidDevice.SendOutputReportAsync(IHidOutputReport report, CancellationToken cancellationToken)
        {
            if (report == null)
            {
                throw new ArgumentNullException(nameof(report));
            }
            var uwpReport = report as UwpOutputReport;
            if (uwpReport == null)
            {
                throw new ArgumentException("Expected a report generated by this device", nameof(report));
            }

            return SendOutputReportAsync(uwpReport.GetFilledReport(), cancellationToken);
        }
Esempio n. 2
0
        Task<int> IHidDevice.SendOutputReportAsync(IHidOutputReport report,
            CancellationToken cancellationToken)
        {
            if (report == null)
            {
                throw new ArgumentNullException(nameof(report));
            }
            var win32Report = report as Win32HidOutputReport;
            if (win32Report == null)
            {
                throw new ArgumentException("Expected a report generated by this device", nameof(report));
            }

            return SendOutputReportAsync(win32Report, cancellationToken);
        }
Esempio n. 3
0
        Task <int> IHidDevice.SendOutputReportAsync(IHidOutputReport report, CancellationToken cancellationToken)
        {
            if (report == null)
            {
                throw new ArgumentNullException(nameof(report));
            }
            var uwpReport = report as UwpOutputReport;

            if (uwpReport == null)
            {
                throw new ArgumentException("Expected a report generated by this device", nameof(report));
            }

            return(SendOutputReportAsync(uwpReport.GetFilledReport(), cancellationToken));
        }
Esempio n. 4
0
        Task <int> IHidDevice.SendOutputReportAsync(IHidOutputReport report,
                                                    CancellationToken cancellationToken)
        {
            if (report == null)
            {
                throw new ArgumentNullException(nameof(report));
            }
            var win32Report = report as Win32HidOutputReport;

            if (win32Report == null)
            {
                throw new ArgumentException("Expected a report generated by this device", nameof(report));
            }

            return(SendOutputReportAsync(win32Report, cancellationToken));
        }