CloudBlockBlob: DownloadTextAsync and UploadTextAsync and Metadata/Properties
<p>As in the Documentation <a href="https://azure.microsoft.com/en-us/documentation/articles/storage-properties-metadata/" rel="nofollow">azure doc</a> or <a href="https://msdn.microsoft.com/en-us/library/microsoft.windowsazure.storage.blob.cloudblockblob_methods.aspx" rel="nofollow">msdn</a> you have to call <code>FetchAttributesAsync()</code> to populate a CloudBlockBlob's metadata.</p>

<p>I've noticed that the Metadata also gets populated when I call <code>DownloadTextAsync()</code> and is written while I call <code>UploadTextAsync()</code>. Is this safe to use as that it won't change in future versions of the storage sdk? I can't really find any documentation that confirms that behaviour.</p>

<p>Sample:</p>

<pre><code>        var blob = container.GetBlockBlobReference("testblob");

        blob.Metadata["testdata"] = "set";

        await blob.UploadTextAsync("content");

        blob.Metadata["notset"] = "set";

        blob = container.GetBlockBlobReference("testblob");

        var content = await blob.DownloadTextAsync();
        // here content["testdata"] is set and content["notset"] is null
</code></pre>

<p>Thanks for information!</p>