dotnet / dotnet/dotnet-api-docs

ReadBlockAsync docs unclear on difference to ReadAsync

Aperta
#1,027 1 commento 7 reazioni 0 assegnatari Vedi su GitHub
area-System.IO dotnet-api/prod Pri2
Lingua principale
C#
Stelle
949
Fork
1.7k
Merge medio
2g 19h
PR unite (30g)
52

Descrizione

The docs for ReadBlockAsync are almost identical to the docs for ReadAsync but their behavior is quite different. ReadBlockAsync appears to try and fill the buffer with `count` characters before returning, only returning early if the stream ended. ReadAsync on the other hand appears to fill a maximum of `count` characters, but will return early if there is no more data ready for reading.

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 3988e630-dd5b-611e-7767-4c5aec0622ae
* Version Independent ID: 9169e86f-d936-61f7-243e-a3d2816fb170
* Content: [StreamReader.ReadBlockAsync Method (System.IO)](https://docs.microsoft.com/en-us/dotnet/api/system.io.streamreader.readblockasync?view=netframework-4.7.2)
* Content Source: [xml/System.IO/StreamReader.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.IO/StreamReader.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia in xml/System.IO/StreamReader.xml e confronta le voci della documentazione di ReadBlockAsync e ReadAsync. Chiarisci che ReadBlockAsync tenta di riempire il numero richiesto, a meno che lo stream non termini, mentre ReadAsync può restituire il controllo quando non sono immediatamente disponibili altri dati. Il lavoro è completato quando la distinzione documentata è chiara e le due voci non appaiono più quasi identiche.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp
Ambito
documentation
Tipo di issue
Documentazione
Difficoltà
1/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.