ublic async Task<List<string>> LookupMukey()
{
var mukeys = new List<string>();
var MV = MapView.Active;
int mukeyCount = 0;
var SelectionLayer = MV.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().Where(fl => fl.Name.Contains("SelectionLayer")).FirstOrDefault();
await QueuedTask.Run(() =>
{
using (var SelectionTable = SelectionLayer.GetTable())
{
using (var rowCursor = SelectionTable.Search())
{
while (rowCursor.MoveNext())
{
using (Row row = rowCursor.Current)
{
var mukey = Convert.ToString(row["mukey"]);
mukeys.Add(mukey);
mukeyCount++;
}
}
}
}
});
return mukeys;
}
var mukeys = await LookupMukey();