public void GetPossibleContingentValues(FeatureClass parcels, string zoningFieldName = "Zone")
{
using (RowBuffer rowBuffer = parcels.CreateRowBuffer())
{
IReadOnlyDictionary<FieldGroup, IReadOnlyList<ContingentValue>> possibleZonings = parcels.GetContingentValues(rowBuffer, zoningFieldName);
IEnumerable<FieldGroup> possibleFieldGroups = possibleZonings.Keys;
foreach (FieldGroup possibleFieldGroup in possibleFieldGroups)
{
IReadOnlyList<ContingentValue> possibleZoningValues = possibleZonings[possibleFieldGroup];
foreach (ContingentValue possibleZoningValue in possibleZoningValues)
{
switch (possibleZoningValue)
{
case ContingentCodedValue codedValue:
string codedValueDomainName = codedValue.Name;
object codedValueDomainValue = codedValue.CodedValue;
break;
case ContingentRangeValue rangeValue:
object rangeDomainMaxValue = rangeValue.Max;
object rangeDomainMinValue = rangeValue.Min;
break;
case ContingentAnyValue contingentAnyValue:
// Any value type
break;
case ContingentNullValue contingentNullValue:
// Null value
break;
}
}
}
}
}