NmeaParser/api/uwp/NmeaParser.BluetoothDevice.ReadAsync.html
2025-01-16 03:51:54 +00:00

212 lines
8.8 KiB
HTML

<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Method ReadAsync </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Method ReadAsync ">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.min.css">
<link rel="stylesheet" href="../../styles/docfx.css">
<link rel="stylesheet" href="../../styles/main.css">
<meta property="docfx:navrel" content="../../toc.html">
<meta property="docfx:tocrel" content="toc.html">
</head>
<body data-spy="scroll" data-target="#affix" data-offset="120">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../index.html">
<img id="logo" class="svg" src="../../images/logo.png" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search" id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</div>
</div>
</header>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="NmeaParser.BluetoothDevice.ReadAsync*">
<h1 id="NmeaParser_BluetoothDevice_ReadAsync_" data-uid="NmeaParser.BluetoothDevice.ReadAsync*">Method ReadAsync</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/dotMorten/NmeaParser/blob/main/artifacts/docs/api_overwrites/applies-to-overwrite.md/#L11140">Edit this page</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/dotMorten/NmeaParser/blob/main/src/NmeaParser/BluetoothDevice.UWP.cs/#L168">View Source</a>
</span>
<a id="NmeaParser_BluetoothDevice_ReadAsync_" data-uid="NmeaParser.BluetoothDevice.ReadAsync*"></a>
<h4 id="NmeaParser_BluetoothDevice_ReadAsync_System_Byte___System_Int32_System_Int32_System_Threading_CancellationToken_" data-uid="NmeaParser.BluetoothDevice.ReadAsync(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)">ReadAsync(byte[], int, int, CancellationToken)</h4>
<div class="markdown level1 summary"><p>Performs a read operation of the stream</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected override Task&lt;int&gt; ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.byte">byte</a>[]</td>
<td><span class="parametername">buffer</span></td>
<td><p>The buffer to write the data into.</p>
</td>
</tr>
<tr>
<td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
<td><span class="parametername">offset</span></td>
<td><p>The byte offset in buffer at which to begin writing data from the stream.</p>
</td>
</tr>
<tr>
<td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
<td><span class="parametername">count</span></td>
<td><p>The maximum number of bytes to read.</p>
</td>
</tr>
<tr>
<td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a></td>
<td><span class="parametername">cancellationToken</span></td>
<td><p>The token to monitor for cancellation requests. The default value is System.Threading.CancellationToken.None.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>&gt;</td>
<td><p>A task that represents the asynchronous read operation. The value of the TResult
parameter contains the total number of bytes read into the buffer. The result
value can be less than the number of bytes requested if the number of bytes currently
available is less than the requested number, or it can be 0 (zero) if the end
of the stream has been reached.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="NmeaParser.NmeaDevice.ReadAsync.html#NmeaParser_NmeaDevice_ReadAsync_System_Byte___System_Int32_System_Int32_System_Threading_CancellationToken_">NmeaDevice.ReadAsync(byte[], int, int, CancellationToken)</a></div>
<h3 id="appliesTo">Applies to</h3>
<div class="appliesto">
<details>
<summary class="has-margin-bottom-medium">
Platforms and versions
</summary>
<div>
<table>
<thead><th>Target</th><th>Versions</th></thead>
<tbody>
<tr><td><b>.NET Windows</b></td><td>main</td></tr>
<tr><td><b>UWP</b></td><td>main, v3.0, v2.2</td></tr>
</tbody>
</table>
</div>
</details>
</div>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
<li>
<a href="https://github.com/dotMorten/NmeaParser/new/main/docs/api_overwrites/new?filename=NmeaParser_BluetoothDevice_ReadAsync_.md&amp;value=---%0Auid%3A%20NmeaParser.BluetoothDevice.ReadAsync*%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Edit this page</a>
</li>
<li>
<a href="https://github.com/dotMorten/NmeaParser/blob/main/src/NmeaParser/BluetoothDevice.UWP.cs/#L168" class="contribution-link">View Source</a>
</li>
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<h5>In this article</h5>
<div></div>
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
<span>Generated by <strong>DocFX</strong></span>
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="../../styles/docfx.vendor.min.js"></script>
<script type="text/javascript" src="../../styles/docfx.js"></script>
<script type="text/javascript" src="../../styles/main.js"></script>
</body>
</html>