IngestionDocumentReader.ReadAsync Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
| Nome | Descrizione |
|---|---|
| ReadAsync(FileInfo, CancellationToken) |
Legge un file e lo converte in un oggetto IngestionDocument. |
| ReadAsync(FileInfo, String, String, CancellationToken) |
Legge un file e lo converte in un oggetto IngestionDocument. |
| ReadAsync(Stream, String, String, CancellationToken) |
Legge un flusso e lo converte in un oggetto IngestionDocument. |
ReadAsync(FileInfo, CancellationToken)
- Origine:
- IngestionDocumentReader.cs
Legge un file e lo converte in un oggetto IngestionDocument.
public System.Threading.Tasks.Task<Microsoft.Extensions.DataIngestion.IngestionDocument> ReadAsync(System.IO.FileInfo source, System.Threading.CancellationToken cancellationToken = default);
member this.ReadAsync : System.IO.FileInfo * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Extensions.DataIngestion.IngestionDocument>
Public Function ReadAsync (source As FileInfo, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IngestionDocument)
Parametri
- source
- FileInfo
File da leggere.
- cancellationToken
- CancellationToken
Token da monitorare per le richieste di annullamento.
Valori restituiti
Attività che rappresenta l'operazione di lettura asincrona.
Eccezioni
source è null.
Si applica a
ReadAsync(FileInfo, String, String, CancellationToken)
- Origine:
- IngestionDocumentReader.cs
Legge un file e lo converte in un oggetto IngestionDocument.
public virtual System.Threading.Tasks.Task<Microsoft.Extensions.DataIngestion.IngestionDocument> ReadAsync(System.IO.FileInfo source, string identifier, string? mediaType = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ReadAsync : System.IO.FileInfo * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Extensions.DataIngestion.IngestionDocument>
override this.ReadAsync : System.IO.FileInfo * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Extensions.DataIngestion.IngestionDocument>
Public Overridable Function ReadAsync (source As FileInfo, identifier As String, Optional mediaType As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IngestionDocument)
Parametri
- source
- FileInfo
File da leggere.
- identifier
- String
Identificatore univoco del documento.
- mediaType
- String
Tipo di supporto del file.
- cancellationToken
- CancellationToken
Token da monitorare per le richieste di annullamento.
Valori restituiti
Attività che rappresenta l'operazione di lettura asincrona.
Eccezioni
sourceo è null o identifier vuoto.
Si applica a
ReadAsync(Stream, String, String, CancellationToken)
- Origine:
- IngestionDocumentReader.cs
Legge un flusso e lo converte in un oggetto IngestionDocument.
public abstract System.Threading.Tasks.Task<Microsoft.Extensions.DataIngestion.IngestionDocument> ReadAsync(System.IO.Stream source, string identifier, string mediaType, System.Threading.CancellationToken cancellationToken = default);
abstract member ReadAsync : System.IO.Stream * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Extensions.DataIngestion.IngestionDocument>
Public MustOverride Function ReadAsync (source As Stream, identifier As String, mediaType As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IngestionDocument)
Parametri
- source
- Stream
Flusso da leggere.
- identifier
- String
Identificatore univoco del documento.
- mediaType
- String
Tipo di supporto del contenuto.
- cancellationToken
- CancellationToken
Token da monitorare per le richieste di annullamento.
Valori restituiti
Attività che rappresenta l'operazione di lettura asincrona.