DelegatingHostedFileClient class
A HostedFileClient that delegates all calls to an inner client.
Subclass this to build middleware that wraps specific methods while delegating others.
This is an experimental feature.
- Implemented types
- Implementers
- Annotations
-
- @Source(name: 'DelegatingHostedFileClient.cs', namespace: 'Microsoft.Extensions.AI', repository: 'dotnet/extensions', path: 'src/Libraries/Microsoft.Extensions.AI.Abstractions/Files/')
Constructors
- DelegatingHostedFileClient(HostedFileClient innerClient)
-
Creates a new DelegatingHostedFileClient wrapping
innerClient.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- innerClient → HostedFileClient
-
The inner client to delegate to.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
delete(
String fileId, {HostedFileClientOptions? options, CancellationToken? cancellationToken}) → Future< bool> -
Deletes a file. Returns
trueif deleted,falseif not found.override -
dispose(
) → void -
Performs application-defined tasks associated with freeing, releasing,
or resetting unmanaged resources.
override
-
download(
String fileId, {HostedFileClientOptions? options, CancellationToken? cancellationToken}) → Stream< List< int> > -
Downloads a file from the AI service as a byte stream.
override
-
getFile(
String fileId, {HostedFileClientOptions? options, CancellationToken? cancellationToken}) → Future< HostedFileContent?> -
Gets metadata about a file, or
nullif not found.override -
getService<
T> ({Object? key}) → T? -
Gets a service of the specified type.
override
-
listFiles(
{HostedFileClientOptions? options, CancellationToken? cancellationToken}) → Stream< HostedFileContent> -
Returns all files visible to this client.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
upload(
Stream< List< content, {String? mediaType, String? fileName, HostedFileClientOptions? options, CancellationToken? cancellationToken}) → Future<int> >HostedFileContent> -
Uploads a file to the AI service.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited