Furion
Furion copied to clipboard
Furion documentation - options
大佬,有考虑实现 Apollo 么
配置我试验过了,不支持列表数据对象的读取?,能否支持?
配置我试验过了,不支持列表数据对象的读取?,能否支持?
必须支持。。。你可以通过 App.GetConfig<T>
或者 App.GetOption<TOption>
都行。。。
var a = App.GetConfig<PowerModel>("AppInfo:PowerModels")
PowerModel对象 public class PowerModel { [JsonProperty("items")] public List<PowerModelOption> Items { get; set; } } public class PowerModelOption { [JsonProperty("powerModel")] public string PowerModel { get; set; }
[JsonProperty("vMax")]
public double VMax { get; set; }
[JsonProperty("vReadMax")]
public double VReadMax { get; set; }
[JsonProperty("cMax")]
public double CMax { get; set; }
[JsonProperty("cReadMax")]
public double CReadMax { get; set; }
}
我试验了一下好像还是不行,Json对象如下: "PowerModels": { "Items": [ { "powerModel": "STB-100", "vMax": "95", "vReadMax": "", "cMax": "1050", "cReadMax": "" }, { "powerModel": "STB-60", "vMax": "85", "vReadMax": "", "cMax": "700", "cReadMax": "" } ] }