Пример #1
0
        private static ConfigurationEntity CreateEntity(IConfiguration configuration)
        {
            var entiry = new ConfigurationEntity();

            UpdateEntity(entiry, configuration);
            return(entiry);
        }
Пример #2
0
 private static IConfiguration CreateConfiguration(ConfigurationEntity entity)
 {
     return(new DisqusConfiguration
     {
         Enabled = entity.Enabled,
         ShortName = entity.ShortName,
         RenderingAreas = entity.RenderingAreas != null?entity.RenderingAreas.ToList() : new List <string>()
     });
 }
Пример #3
0
 private static void UpdateEntity(ConfigurationEntity entity, IConfiguration configuration)
 {
     entity.Enabled        = configuration.Enabled;
     entity.ShortName      = configuration.ShortName;
     entity.RenderingAreas = configuration.RenderingAreas.ToList();
 }