LitS3.S3Service.ForEachBucket C# (CSharp) Method

ForEachBucket() public method

Performs the given action on each of your buckets without loading the list of buckets completely into memory.
public ForEachBucket ( Action action ) : void
action Action
return void
        public void ForEachBucket(Action<Bucket> action)
        {
            using (GetAllBucketsResponse response = new GetAllBucketsRequest(this).GetResponse())
                foreach (Bucket bucket in response.Buckets)
                    action(bucket);
        }