Пример #1
0
        public static IAsyncEnumerable <FileSystemEntry> ListFilesAsync(
            this FileSystem.FileSystemClient client,
            CancellationToken cancellationToken = default)
        {
            var streamingCall = client.ListFiles(new Empty(), Metadata.Empty, null, cancellationToken);

            return(streamingCall.ResponseStream.ReadAllAsync(cancellationToken));
        }
Пример #2
0
 public FileSystemClientWrapper(FileSystem.FileSystemClient client)
 {
     _client = client ?? throw new ArgumentNullException(nameof(client));
 }
Пример #3
0
 public static AsyncServerStreamingCall <FileSystemEntry> ListFiles(
     this FileSystem.FileSystemClient client,
     CancellationToken cancellationToken = default)
 {
     return(client.ListFiles(new Empty(), Metadata.Empty, null, cancellationToken));
 }