API.DataAccess.StorageManager.SetPlatformTags C# (CSharp) Метод

SetPlatformTags() публичный Метод

Puts a dictionary that takes a PlatformNo (5-digit number) to PlatformTag (3-digit number).
public SetPlatformTags ( string platformTagsJson ) : void
platformTagsJson string
Результат void
        public void SetPlatformTags(string platformTagsJson)
        {
            if (string.IsNullOrWhiteSpace(platformTagsJson))
            {
                throw new ArgumentNullException(nameof(platformTagsJson), "An empty dictionary can't be put in the datastore.");
            }

            CloudBlockBlob blob = GetBlockBlob(_platformTagsKey);
            blob.UploadText(platformTagsJson);
        }

Usage Example

        public void SetPlatformTags(Dictionary <int, int> platformTags)
        {
            var platformTagsJson = JsonConvert.SerializeObject(platformTags);

            _storageManager.SetPlatformTags(platformTagsJson);
            _cacheManager.SetPlatformTags(platformTagsJson);
        }