Exemplo n.º 1
0
 public IEnumerable<S3Object> GetObjects(string bucketName, string objectName, int length, int offset, S3ObjectType type, long version)
 {
     var request = new Ds3.Calls.GetObjectsDetailsSpectraS3Request
     {
         BucketId = bucketName,
         Name = objectName,
         PageLength = length,
         PageOffset = offset,
         Type = type,
         Version = version
     };
     var response = _client.GetObjectsDetailsSpectraS3(request);
     foreach (var ds3Object in response.ResponsePayload.S3Objects)
     {
         yield return ds3Object;
     }
 }
 public GetObjectsDetailsSpectraS3Request WithType(S3ObjectType? type)
 {
     this._type = type;
     if (type != null)
     {
         this.QueryParams.Add("type", type.ToString());
     }
     else
     {
         this.QueryParams.Remove("type");
     }
     return this;
 }
Exemplo n.º 3
0
        protected bool runGetObjects(string bucket, string name, int length, int offset, S3ObjectType type, long version)
        {
            var items = GetObjects(bucket, name, length, offset, type, version);

            // Loop through all of the objects in the bucket.
            foreach (var obj in items)
            {
                Console.WriteLine("Object '{0}' | {1} | {2} | {3} ", obj.Name, obj.Version, obj.Type, obj.CreationDate);
            }
            return true;
        }