Exemplo n.º 1
0
        private static void InitWeatherClient(List <WeatherNode> nodes)
        {
            var config = WeatherConfigSection.GetConfig();

            if (nodes != null && nodes.Any())
            {
                config.Nodes = nodes;
            }
            _weatherClient = new WeatherClientWrapper(config);
        }
Exemplo n.º 2
0
 protected override void Load(ContainerBuilder builder)
 {
     builder.RegisterType <WeatherClientWrapper>().As <IWeatherClientWrapper>().WithParameter("config", WeatherConfigSection.GetConfig());
     base.Load(builder);
 }