Esempio n. 1
0
        internal static BlobTags ToBlobTags(this Tags tags)
        {
            BlobTags blobTags = new BlobTags();

            foreach (KeyValuePair <string, string> tag in tags)
            {
                blobTags.BlobTagSet.Add(new BlobTag
                {
                    Key   = tag.Key,
                    Value = tag.Value
                });
            }
            return(blobTags);
        }
Esempio n. 2
0
        internal static IDictionary <string, string> ToTagDictionary(this BlobTags blobTags)
        {
            if (blobTags?.BlobTagSet == null)
            {
                return(null);
            }
            Dictionary <string, string> tags = new Dictionary <string, string>();

            foreach (BlobTag blobTag in blobTags.BlobTagSet)
            {
                tags[blobTag.Key] = blobTag.Value;
            }

            return(tags);
        }