Class IngestClientExtensions
Convenience extensions for IIngestClient
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Syntax
public static class IngestClientExtensions
Methods
ImportFilesAsync(IIngestClient, IDictionary<IngestFile, FileImportWithFileNameOverrideRequest>, ImportOptions?, TimeSpan?, bool, CancellationToken)
Imports files from container into Content Platform allowing assignment of different metadata for each file.
Declaration
public static Task<ContentBatchOperationWithRequestIdResult> ImportFilesAsync(this IIngestClient client, IDictionary<IngestFile, FileImportWithFileNameOverrideRequest> requests, ImportOptions? options = null, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken ct = default)
Parameters
IIngestClient
client
Ingest client |
IDictionary<IngestFile, FileImportWithFileNameOverrideRequest>
requests
Request for each file |
ImportOptions
options
Import options |
TimeSpan?
timeout
Time to wait for business process completion |
bool
waitSearchDocCreation
Indicates if search document creation should be awaited |
CancellationToken
ct
Cancellation token |
Returns
Task<ContentBatchOperationWithRequestIdResult>
ContentBatchOperationWithRequestIdResult |
Remarks
All items must reside in the same ingest container otherwise InvalidOperationException is thrown.
ImportFilesAsync(IIngestClient, IReadOnlyCollection<IngestFile>, ImportOptions?, FileImportRequest?, TimeSpan?, bool, CancellationToken)
Imports files from container into Content Platform.
Declaration
public static Task<ContentBatchOperationWithRequestIdResult> ImportFilesAsync(this IIngestClient client, IReadOnlyCollection<IngestFile> files, ImportOptions? options = null, FileImportRequest? requestForAllFiles = null, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken ct = default)
Parameters
IIngestClient
client
Ingest client |
IReadOnlyCollection<IngestFile>
files
Files to import |
ImportOptions
options
Options for import |
FileImportRequest
requestForAllFiles
Metadata, permission sets etc. to assign for all files on import |
TimeSpan?
timeout
Time to wait for business process completion |
bool
waitSearchDocCreation
Indicates if search document creation should be awaited |
CancellationToken
ct
Cancellation token |
Returns
Task<ContentBatchOperationWithRequestIdResult>
ContentBatchOperationWithRequestIdResult |
Remarks
All files must reside in the same ingest container otherwise InvalidOperationException is thrown.
ImportFromUrlsAsync(IIngestClient, IDictionary<string, UrlImportRequest>, ImportOptions?, TimeSpan?, bool, CancellationToken)
Imports specified URLs into Content Platform.
Declaration
public static Task<ContentBatchOperationWithRequestIdResult> ImportFromUrlsAsync(this IIngestClient client, IDictionary<string, UrlImportRequest> requests, ImportOptions? options = null, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken ct = default)
Parameters
IIngestClient
client
Ingest client |
IDictionary<string, UrlImportRequest>
requests
Requests |
ImportOptions
options
Import options |
TimeSpan?
timeout
Time to wait for business process completion |
bool
waitSearchDocCreation
Indicates if search document creation should be awaited |
CancellationToken
ct
Cancellation token |
Returns
Task<ContentBatchOperationWithRequestIdResult>
ContentBatchOperationWithRequestIdResult |
UploadAndImportFilesAsync(IIngestClient, IEnumerable<IngestUploadItem>, FileImportRequest?, IngestUploadOptions?, ImportOptions?, TimeSpan?, bool, CancellationToken)
Uploads items and imports them into Content Platform.
Declaration
public static Task<ContentBatchOperationWithRequestIdResult> UploadAndImportFilesAsync(this IIngestClient client, IEnumerable<IngestUploadItem> items, FileImportRequest? requestForAllItems = null, IngestUploadOptions? uploadOptions = null, ImportOptions? importOptions = null, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken ct = default)
Parameters
IIngestClient
client
Ingest client |
IEnumerable<IngestUploadItem>
items
Items to upload |
FileImportRequest
requestForAllItems
Metadata, permission sets etc. to assign for all files on import |
IngestUploadOptions
uploadOptions
Upload options |
ImportOptions
importOptions
Import options |
TimeSpan?
timeout
Time to wait for business process completion |
bool
waitSearchDocCreation
Indicates if search document creation should be awaited |
CancellationToken
ct
Cancellation token |
Returns
Task<ContentBatchOperationWithRequestIdResult>
ContentBatchOperationWithRequestIdResult |
UploadAndImportFilesAsync(IIngestClient, IEnumerable<string>, FileImportRequest?, IngestUploadOptions?, ImportOptions?, TimeSpan?, bool, CancellationToken)
Uploads files from local filesystem and imports them into Content Platform.
Declaration
public static Task<ContentBatchOperationWithRequestIdResult> UploadAndImportFilesAsync(this IIngestClient client, IEnumerable<string> filePaths, FileImportRequest? requestForAllFiles = null, IngestUploadOptions? uploadOptions = null, ImportOptions? importOptions = null, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken ct = default)
Parameters
IIngestClient
client
Ingest client |
IEnumerable<string>
filePaths
Path to files |
FileImportRequest
requestForAllFiles
Metadata, permission sets etc. to assign for all files on import |
IngestUploadOptions
uploadOptions
Upload options |
ImportOptions
importOptions
Import options |
TimeSpan?
timeout
Time to wait for business process completion |
bool
waitSearchDocCreation
Indicates if search document creation should be awaited |
CancellationToken
ct
Cancellation token |
Returns
Task<ContentBatchOperationWithRequestIdResult>
ContentBatchOperationWithRequestIdResult |
UploadFileAsync(IIngestClient, IngestUploadItem, CancellationToken)
Uploads a single item to ingest container
Declaration
public static Task<IngestFile> UploadFileAsync(this IIngestClient client, IngestUploadItem item, CancellationToken ct = default)
Parameters
IIngestClient
client
Ingest client |
IngestUploadItem
item
Item to upload |
CancellationToken
ct
Cancellation token |
Returns
Task<IngestFile>
IngestFile instance |
Remarks
This only uploads the item, to import it, call one of the Import* methods later.
UploadFileAsync(IIngestClient, string, CancellationToken)
Uploads a file from local filesystem to ingest container
Declaration
public static Task<IngestFile> UploadFileAsync(this IIngestClient client, string filePath, CancellationToken ct = default)
Parameters
IIngestClient
client
Ingest client |
string
filePath
Path to file |
CancellationToken
ct
Cancellation token |
Returns
Task<IngestFile>
IngestFile instance |
Remarks
This only uploads the file, to import it, call one of the Import* methods later.
UploadFilesAsync(IIngestClient, IEnumerable<IngestUploadItem>, IngestUploadOptions?, CancellationToken)
Upload items to ingest container
Declaration
public static Task<IReadOnlyCollection<IngestFile>> UploadFilesAsync(this IIngestClient client, IEnumerable<IngestUploadItem> items, IngestUploadOptions? options = null, CancellationToken ct = default)
Parameters
IIngestClient
client
Ingest client |
IEnumerable<IngestUploadItem>
items
Items to upload |
IngestUploadOptions
options
Upload options |
CancellationToken
ct
Cancellation token |
Returns
Task<IReadOnlyCollection<IngestFile>>
Collection of IngestFile instances |
Remarks
This only uploads items, to import them, call one of the Import* methods later.
UploadFilesAsync(IIngestClient, IEnumerable<string>, IngestUploadOptions?, CancellationToken)
Upload files from local filesystem to ingest container
Declaration
public static Task<IReadOnlyCollection<IngestFile>> UploadFilesAsync(this IIngestClient client, IEnumerable<string> filePaths, IngestUploadOptions? options = null, CancellationToken ct = default)
Parameters
IIngestClient
client
Ingest client |
IEnumerable<string>
filePaths
Path to files |
IngestUploadOptions
options
Upload options |
CancellationToken
ct
Cancellation token |
Returns
Task<IReadOnlyCollection<IngestFile>>
Collection of IngestFile instances |
Remarks
This only uploads files, to import them, call one of the Import* methods later.