@@ -379,50 +379,6 @@ internal async Task ListBlobsByPrefix(long taskId, IStorageBlobManagement localC
379
379
}
380
380
}
381
381
382
- /// <summary>
383
- /// list blobs by blob Tag
384
- /// </summary>
385
- /// <param name="containerName">container name</param>
386
- /// <param name="prefix">blob preifx</param>
387
- /// <returns>An enumerable collection of IListBlobItem</returns>
388
- internal async Task ListBlobsByTag ( long taskId , IStorageBlobManagement localChannel , string tagFilterSqlExpression )
389
- {
390
-
391
- BlobServiceClient blobServiceClient = Util . GetTrack2BlobServiceClient ( localChannel . StorageContext , ClientOptions ) ;
392
-
393
- int listCount = InternalMaxCount ;
394
- int MaxListCount = 5000 ;
395
- int requestCount = MaxListCount ;
396
- int realListCount = 0 ;
397
- BlobContinuationToken continuationToken = ContinuationToken ;
398
- string track2ContinuationToken = this . ContinuationToken is null ? null : this . ContinuationToken . NextMarker ;
399
-
400
- do
401
- {
402
- requestCount = Math . Min ( listCount , MaxListCount ) ;
403
- realListCount = 0 ;
404
- IAsyncEnumerator < Page < TaggedBlobItem > > enumerator = blobServiceClient . FindBlobsByTagsAsync ( tagFilterSqlExpression , CmdletCancellationToken )
405
- . AsPages ( track2ContinuationToken , requestCount )
406
- . GetAsyncEnumerator ( ) ;
407
-
408
- Page < TaggedBlobItem > page ;
409
- await enumerator . MoveNextAsync ( ) . ConfigureAwait ( false ) ;
410
- page = enumerator . Current ;
411
- foreach ( TaggedBlobItem item in page . Values )
412
- {
413
- BlobContainerClient track2container = blobServiceClient . GetBlobContainerClient ( item . BlobContainerName ) ;
414
- OutputStream . WriteObject ( taskId , GetAzureStorageBlob ( item , track2container , localChannel . StorageContext , page . ContinuationToken , ClientOptions ) ) ;
415
- realListCount ++ ;
416
- }
417
- track2ContinuationToken = page . ContinuationToken ;
418
-
419
- if ( InternalMaxCount != int . MaxValue )
420
- {
421
- listCount -= realListCount ;
422
- }
423
- } while ( listCount > 0 && ! string . IsNullOrEmpty ( track2ContinuationToken ) ) ;
424
- }
425
-
426
382
public static AzureStorageBlob GetAzureStorageBlob ( BlobItem blobItem , BlobContainerClient track2container , AzureStorageContext context , string continuationToken = null , BlobClientOptions options = null )
427
383
{
428
384
BlobBaseClient blobClient = Util . GetTrack2BlobClient ( track2container , blobItem . Name , context , blobItem . VersionId , blobItem . IsLatestVersion , blobItem . Snapshot , options , blobItem . Properties . BlobType ) ;
0 commit comments