public sealed class ContingentAnyValue : ContingentValue
Public NotInheritable Class ContingentAnyValue Inherits ContingentValue
public sealed class ContingentAnyValue : ContingentValue
Public NotInheritable Class ContingentAnyValue Inherits ContingentValue
public void ExploreContingentValues(Table table) { using (TableDefinition tableDefinition = table.GetDefinition()) { IReadOnlyList<Contingency> contingencies = tableDefinition.GetContingencies(); foreach (Contingency contingency in contingencies) { // Field group FieldGroup filedGroup = contingency.FieldGroup; string fieldGroupName = filedGroup.Name; IReadOnlyList<string> fieldInFieldGroup = filedGroup.FieldNames; bool isEditRestriction = filedGroup.IsRestrictive; int contingencyId = contingency.ID; Subtype subtype = contingency.Subtype; bool isContingencyRetired = contingency.IsRetired; // Contingent values IReadOnlyDictionary<string, ContingentValue> contingentValuesByFieldName = contingency.GetContingentValues(); foreach (KeyValuePair<string, ContingentValue> contingentValueKeyValuePair in contingentValuesByFieldName) { string attributeFieldName = contingentValueKeyValuePair.Key; // Contingent value type associated with the attribute field ContingentValue contingentValue = contingentValueKeyValuePair.Value; switch (contingentValue) { case ContingentCodedValue contingentCodedValue: string codedValueDomainName = contingentCodedValue.Name; object codedValueDomainValue = contingentCodedValue.CodedValue; break; case ContingentRangeValue contingentRangeValue: object rangeDomainMaxValue = contingentRangeValue.Max; object rangeDomainMinValue = contingentRangeValue.Min; break; case ContingentAnyValue contingentAnyValue: // Any value type break; case ContingentNullValue contingentNullValue: // Null value break; } } } } }
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; } } } } }
System.Object
ArcGIS.Core.Data.ContingentValue
ArcGIS.Core.Data.ContingentAnyValue
Target Platforms: Windows 11, Windows 10