Пример #1
0
        private void InitConfig()
        {
            var readers    = "Cache,Environment,Database";
            var readerList = readers.Split(',').Reverse();

            foreach (var reader in readerList)
            {
                switch (reader)
                {
                case "Cache":
                    configReader = new ConfigReader.CacheReader(configReader);
                    continue;

                case "Environment":
                    configReader = new ConfigReader.EnvironmentReader(configReader);
                    continue;

                case "Database":
                    configReader = new ConfigReader.DatabaseReader(configReader);
                    continue;
                }
            }
        }
Пример #2
0
 public EnvironmentReader(ConfigReader reader) : base(reader)
 {
 }
Пример #3
0
 public CacheReader(ConfigReader reader) : base(reader)
 {
 }
Пример #4
0
 public ReaderDecorator(ConfigReader reader)
 {
     this.reader = reader;
 }
Пример #5
0
 public DatabaseReader(ConfigReader reader) : base(reader)
 {
 }