LoggingHostedFileClient class

A DelegatingHostedFileClient that logs file operations.

This is an experimental feature.

Inheritance
Annotations
  • @Source(name: 'LoggingHostedFileClient.cs', namespace: 'Microsoft.Extensions.AI', repository: 'dotnet/extensions', path: 'src/Libraries/Microsoft.Extensions.AI/Files/')

Constructors

LoggingHostedFileClient(HostedFileClient innerClient, {String? loggerName})
Creates a new LoggingHostedFileClient.

Properties

hashCode int
The hash code for this object.
no setterinherited
innerClient HostedFileClient
The inner client to delegate to.
finalinherited
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 true if deleted, false if not found.
override
dispose() → void
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
inherited
download(String fileId, {HostedFileClientOptions? options, CancellationToken? cancellationToken}) Stream<List<int>>
Downloads a file from the AI service as a byte stream.
inherited
getFile(String fileId, {HostedFileClientOptions? options, CancellationToken? cancellationToken}) Future<HostedFileContent?>
Gets metadata about a file, or null if not found.
inherited
getService<T>({Object? key}) → T?
Gets a service of the specified type.
inherited
listFiles({HostedFileClientOptions? options, CancellationToken? cancellationToken}) Stream<HostedFileContent>
Returns all files visible to this client.
inherited
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<int>> content, {String? mediaType, String? fileName, HostedFileClientOptions? options, CancellationToken? cancellationToken}) Future<HostedFileContent>
Uploads a file to the AI service.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited