Beispiel #1
0
        protected void Parse(BaseAliyunConfigurationSetting setting, IConfiguration configuration)
        {
            var configNode = configuration.GetSection("config");

            if (configNode.Exists())
            {
                setting.AccessId     = configNode["accessId"];
                setting.AccessSecret = configNode["accessSecret"];
                setting.RegionId     = configNode["regionId"];
            }
        }
Beispiel #2
0
        protected void Parse(BaseAliyunConfigurationSetting setting, XmlNode section)
        {
            var configNode = section.SelectSingleNode("config");

            if (configNode != null)
            {
                setting.AccessId     = configNode.GetAttributeValue("accessId");
                setting.AccessSecret = configNode.GetAttributeValue("accessSecret");
                setting.RegionId     = configNode.GetAttributeValue("regionId");
            }
        }