Exemplo n.º 1
0
 private static void verifyBucketResponseParameters(ListBucketResponse listBucketResponse,
     string bucketName, string prefix, string marker,
     int maxKeys, string delimiter, bool isTruncated,
     string nextMarker)
 {
     assertEquals(bucketName, listBucketResponse.Name, "Bucket name should match.");
     assertEquals(prefix, listBucketResponse.Prefix, "Bucket prefix should match.");
     assertEquals(marker, listBucketResponse.Marker, "Bucket marker should match.");
     assertEquals(delimiter, listBucketResponse.Delimiter, "Bucket delimiter should match.");
     if (UnspecifiedMaxKeys != maxKeys)
     {
         assertEquals(maxKeys, listBucketResponse.MaxKeys, "Bucket max-keys should match.");
     }
     assertEquals(isTruncated, listBucketResponse.IsTruncated, "Bucket should not be truncated.");
     assertEquals(nextMarker, listBucketResponse.NextMarker, "Bucket nextMarker should match.");
 }
Exemplo n.º 2
0
 private static void dumpBucketListing(ListBucketResponse list)
 {
     foreach (ListEntry entry in list.Entries)
     {
         Owner o = entry.Owner;
         if (o == null)
         {
             o = new Owner("", "");
         }
         System.Console.WriteLine( entry.Key.PadRight( 20 ) + 
                                   entry.ETag.PadRight( 20 ) +
                                   entry.LastModified.ToString().PadRight( 20 ) +
                                   o.Id.PadRight( 10 ) +
                                   o.DisplayName.PadRight( 20 ) +
                                   entry.Size.ToString().PadRight( 11 ) +
                                   entry.StorageClass.PadRight( 10 ) );
     }
 }