Click here to Skip to main content
15,905,776 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have below code that match particular string and return blob uri.but this is time consuming and take a more execution time.

So I want to single return statement that return blob uri.how can I do that.how can I specify where statement with container.ListBlobs() or any other idea.Please help me.


C#
foreach (var properties in container.ListBlobs())
          {
                var blob = properties.Container.GetBlobReference(properties.Uri.ToString());
              if (intBLOBID == RemoveFileExtension(blob.Uri.Segments[2]))
                  return blob.Uri.ToString();

          }



Please give me proper solution with above modified statement.

Waiting for quick reply.

Thanks.
Posted

1 solution

You could avoid calling GetBlobReference since you already have the uri of the blob. Anyway the bottleneck is probably in the network latency rather than in computation time, and for that there's not much you can do :)

--Edit
Wait a second, what are you trying to do? if you alread have the blob name why not simply check for existence?
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900