jjzjj

DynParamQuotedString

全部标签

c# - Powershell 模块 : Dynamic mandatory hierarchical parameters

所以我真正想要的是在PS模块中有点可用的制表符补全。ValidateSet似乎是去这里的方式。不幸的是我的数据是动态的,所以我不能预先用所有有效值注释参数。DynamicParameters/IDynamicParameters似乎是那个问题的解决方案。将这些东西放在一起(并将我的失败归结为一个简单的测试用例)我们最终得到:usingSystem;usingSystem.Collections.Generic;usingSystem.Collections.ObjectModel;usingSystem.Linq;usingSystem.Management.Automation;us

c# - Powershell 模块 : Dynamic mandatory hierarchical parameters

所以我真正想要的是在PS模块中有点可用的制表符补全。ValidateSet似乎是去这里的方式。不幸的是我的数据是动态的,所以我不能预先用所有有效值注释参数。DynamicParameters/IDynamicParameters似乎是那个问题的解决方案。将这些东西放在一起(并将我的失败归结为一个简单的测试用例)我们最终得到:usingSystem;usingSystem.Collections.Generic;usingSystem.Collections.ObjectModel;usingSystem.Linq;usingSystem.Management.Automation;us