Metodo di estensione Stream.AsyncRead (F#)

Restituisce un calcolo asincrono che leggerà dal flusso al buffer specificato.

Percorso spazio dei nomi/modulo: Microsoft.FSharp.Control.CommonExtensions

Assembly: FSharp.Core (in FSharp.Core.dll)

// Signatures:
type System.IO.Stream with
  member AsyncRead : byte [] * ?int * ?int -> Async<int>
type System.IO.Stream with
  member AsyncRead : int -> Async<byte []>

// Usage:
stream.AsyncRead (buffer)
stream.AsyncRead (count)

Parametri

  • buffer
    Tipo: byte[]

    Buffer in cui leggere.

  • offset
    Tipo: int

    Offset facoltativo sotto forma di numero di byte nel flusso.

  • count
    Tipo: int

    Numero facoltativo di byte da leggere dal flusso.

Eccezioni

Eccezione

Descrizione

ArgumentException

Generata se la somma di offset e count è maggiore della lunghezza del buffer.

ArgumentOutOfRangeException

Generata se offset o count è negativo.

Note

Questo membro è denominato AsyncRead negli assembly compilati. Utilizzare questo nome per accedere al metodo da un linguaggio diverso da F# o tramite reflection.

Piattaforme

Windows 7, Windows Vista SP2, Windows XP SP3, Windows XP x64 SP2, Windows Server 2008 R2, Windows Server 2008 SP2, Windows Server 2003 SP2

Informazioni sulla versione

F# Runtime

Supportato in: 2.0

Silverlight

Supportato in: 3

Vedere anche

Riferimenti

Modulo Control.CommonExtensions (F#)

Stream