In the previous article, we have described the use of BLOB storage and its status in Windows Azure storage. Now let's demonstrate how to bring the blob storage into our lives with the simplest code.
The final effect is as follows: (demo http://ibm.cloudapp.net/DriveC.aspx deployed to the cloud)
While Windows Azure storage all provide rest programming interfaces, you don't want to deal with tedious httpwebrequest in real programming? Microsoft has done a very thoughtful job of encapsulating all the rest programming interfaces of Windows Azure storage into the C # class, all of which are contained within. When we actually develop, we just need to reference the project or the DLL it compiles, and we can say goodbye to the bare rest and use those very handy classes and methods!
The structure of the project is shown below.
This project defines three abstract classes of Windows Azure storage services, such as BlobStorage.cs, and defines classes that encapsulate the rest implementation methods, such as RestBlobStorage.cs, that coincide with the abstract class. Restblobstorage is the Star class that will be used in this article.