public IReadOnlyList<Contingency> GetContingencies()
Public Function GetContingencies() As IReadOnlyList(Of Contingency)
Return Value
The list of contingencies, Contingency.
public IReadOnlyList<Contingency> GetContingencies()
Public Function GetContingencies() As IReadOnlyList(Of Contingency)
Exception | Description |
---|---|
ArcGIS.Core.Data.Exceptions.GeodatabaseException | A geodatabase-related exception has occurred. |
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; } } } } }
Target Platforms: Windows 11, Windows 10