IngestionDocumentReader.ReadAsync Metod

Definition

Överlagringar

Name Description
ReadAsync(FileInfo, CancellationToken)

Läser en fil och konverterar den till en IngestionDocument.

ReadAsync(FileInfo, String, String, CancellationToken)

Läser en fil och konverterar den till en IngestionDocument.

ReadAsync(Stream, String, String, CancellationToken)

Läser en ström och konverterar den till en IngestionDocument.

ReadAsync(FileInfo, CancellationToken)

Källa:
IngestionDocumentReader.cs

Läser en fil och konverterar den till en 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)

Parametrar

source
FileInfo

Filen som ska läsas.

cancellationToken
CancellationToken

Token som ska övervakas för annulleringsbegäranden.

Returer

En uppgift som representerar den asynkrona läsåtgärden.

Undantag

source är null.

Gäller för

ReadAsync(FileInfo, String, String, CancellationToken)

Källa:
IngestionDocumentReader.cs

Läser en fil och konverterar den till en 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)

Parametrar

source
FileInfo

Filen som ska läsas.

identifier
String

Dokumentets unika identifierare.

mediaType
String

Medietypen för filen.

cancellationToken
CancellationToken

Token som ska övervakas för annulleringsbegäranden.

Returer

En uppgift som representerar den asynkrona läsåtgärden.

Undantag

source eller identifier är null eller tom.

Gäller för

ReadAsync(Stream, String, String, CancellationToken)

Källa:
IngestionDocumentReader.cs

Läser en ström och konverterar den till en 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)

Parametrar

source
Stream

Strömmen som ska läsas.

identifier
String

Dokumentets unika identifierare.

mediaType
String

Medietypen för innehållet.

cancellationToken
CancellationToken

Token som ska övervakas för annulleringsbegäranden.

Returer

En uppgift som representerar den asynkrona läsåtgärden.

Gäller för