我有以下代码:
public void Test(Request request, Func<IEnumerable<Building>> buildings)
{
vm.Buildings = Helper.GenerateDropdownList(request.BuildingId,() => buildings());
}
我现在想向buildings()
回调传递一个额外的参数
public void Test(Request request, Func<IEnumerable<Building>> buildings)
{
var cityId = GetCity();
vm.Buildings = Helper.GenerateDropdownList(request.BuildingId,() => buildings(cityId));
}
输入该参数的正确方法是什么?