I have two solution:
Sol1:
public class Sol1{
internal override IList<MenuItem> MenuItems
{
//some code
GetItems();
return items;
}
internal override async void GetItems()
{
//code
//async method
//code
//async method
}
}
Solution one is creating first first level of menu. Then into Solution 2, after fist level menu is created I want to have access to this "items".
Sol2:
public class Sol2{
private async Task SecondLev{
//some code
Sol1 sol1 = new Sol1();
var test = sol1.items;
}
}
But they are always empty. I don't want to run one more time method MenuItems, but have access to this items.