private SnapshotTextEntry Map(ConfigInstance config)
        {
            var configObject = ConfigStorageObjectHelper.BuildStorageObject(config);

            return(new SnapshotTextEntry {
                ConfigurationJson = JsonConvert.SerializeObject(configObject), ConfigurationName = config.Name
            });
        }
Exemplo n.º 2
0
 /// <summary>
 /// Saves changes to configuration
 /// </summary>
 /// <param name="config">Updated configuration to be saved</param>
 /// <returns>A task that represents the asynchronous save operation.</returns>
 public async Task UpdateConfigAsync(ConfigInstance config)
 {
     var configId   = config.ConfigType.Name;
     var configText = JsonConvert.SerializeObject(ConfigStorageObjectHelper.BuildStorageObject(config), jsonSerializerSettings);
     await storageConnector.SetConfigFileAsync(configId, config.ConfigurationIdentity.Client.ClientId, configText);
 }