Exemplo n.º 1
0
        public static void Main(string[] args)
        {
            using (var reader = new StreamReader("Config/mantle-config.yaml")) {
                var yaml = new YamlStream();
                yaml.Load(reader);

                var mapping  = (YamlMappingNode)yaml.Documents[0].RootNode;
                var yamlDict = mapping.Children;

                MantleConfig = new MantleConfig()
                {
                    ProductId = yamlDict["productId"].ToString(),
                    ApiKey    = yamlDict["apiKey"].ToString(),
                    ApiUrl    = yamlDict["apiUrl"].ToString()
                };

                BuildWebHost(args).Run();
            }
        }
 public EnergyCreditsController(RestClient mantleRestClient, MantleConfig mantleConfig)
 {
     _mantleRestClient = mantleRestClient;
     _mantleConfig     = mantleConfig;
 }