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

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

public SetSchedule ( string scheduleJson ) : void
scheduleJson string
Результат void
        public void SetSchedule(string scheduleJson)
        {
            if (string.IsNullOrWhiteSpace(scheduleJson))
            {
                throw new ArgumentNullException(nameof(scheduleJson), "An empty schedule can't be put in the datastore.");
            }

            CloudBlockBlob blob = GetBlockBlob(_scheduleKey);
            blob.UploadText(scheduleJson);
        }

Usage Example

        public void SetSchedule(ServerBusSchedule schedule)
        {
            var scheduleJson = JsonConvert.SerializeObject(schedule);

            _storageManager.SetSchedule(scheduleJson);
            _cacheManager.SetSchedule(scheduleJson);
        }