f# - F#:以编程方式操作标识符
问题描述
我正在与World Bank type provider合作,并试图操纵国家和指标。以。。。开始
let context = WorldBankDataProvider<"World Development Indicators">.GetDataContext ()
我可以得到Country
一个
let france = context.Countries.France
并且以Indicator
那个国家为基础
let franceCAIndicator = france.Indicators.``Current account balance (% of GDP)``
查看 的代码Runtime.WorldBank
,似乎 anIndicator
根据定义以国家/地区为基础,因为它有一个实例成员Code
,该成员设置为国家或地区代码。但我希望能够引用某种没有国家对象的指标,然后将其与国家结合起来。也许一个IndicatorDescription
是我所寻求的?这会产生一个IndicatorDescription
:
let CADescription = context.Topics.Trade.Indicators.``Current account balance (% of GDP)``
但是我怎样才能将它与 a 结合起来Country
产生 a Indicator
?在没有更优雅的解决方案的情况下,有没有办法以编程方式操作标识符
``Current account balance (% of GDP)``
即以某种方式将其绑定到另一个标识符,然后构造Indicator
france.Indicators.``Current account balance (% of GDP)``
从那个标识符和france
?
解决方案
推荐阅读
- javascript - 将数据从 Node/Express 传递到前端 Javascript
- locust - 无法正确加载 webUI
- javascript - CSS汉堡菜单关闭时减半
- python - 关于元组,我有什么遗漏吗?
- javascript - 有没有办法仅使用 Javascript、HTML、CSS(无 Jquery)在内部资源管理器上执行 onChange()
- xcode - 使用 Apple ID 登录 AKAuthenticationError Code=-7014
- c# - C# UML图解读
- docker - 无法访问 rewrite_by_lua_block 中的 ngx.var
- c# - 如何在列表框中绘制特定行(WPF 应用程序)
- c++ - 使用移位无符号数作为数组的索引号是一个好习惯