OpenTAP 9.34
API Reference
OpenTap.ValidatingObject Class Referenceabstract

Runtime property value error-checking system. Can be used to validate an object before run or to display messages through a GUI. More...

Inheritance diagram for OpenTap.ValidatingObject:
OpenTap.IValidatingObject OpenTap.ComponentSettings< AuthenticationSettings > OpenTap.ComponentSettings< DerivedType > OpenTap.ComponentSettings< EngineSettings > OpenTap.ComponentSettings< PackageManagerSettings > OpenTap.ComponentSettings< T > OpenTap.Connection OpenTap.Limit OpenTap.LimitCondition OpenTap.Package.RepositorySettingEntry OpenTap.Resource OpenTap.RfConnection.CableLossPoint OpenTap.TestStep

Public Member Functions

void OnPropertyChanged (string propertyName)
 Triggers the PropertyChanged event.
 
- Public Member Functions inherited from OpenTap.IValidatingObject

Protected Member Functions

virtual string GetError (string propertyName=null)
 Return the error for a given property.
 
void ThrowOnValidationError (bool ignoreDisabledProperties)
 Checks all validation rules on this object (Rules) and throws an AggregateException on errors.
 

Properties

ValidationRuleCollection Rules [get]
 All the validation rules. Add new rules to this in order to get runtime value validation.
 
string Error [get]
 Gets the error messages for each invalid rule and joins them with a newline.
 
- Properties inherited from OpenTap.IValidatingObject

Events

PropertyChangedEventHandler PropertyChanged
 Standard PropertyChanged event object.
 

Detailed Description

Runtime property value error-checking system. Can be used to validate an object before run or to display messages through a GUI.

Only works on properties, not fields. The functionality is implemented primarily with a GUI in mind.

Member Function Documentation

◆ OnPropertyChanged()

void OpenTap.ValidatingObject.OnPropertyChanged ( string propertyName)
inline

Triggers the PropertyChanged event.

Parameters
propertyNamestring name of which property has been changed.

Implements OpenTap.IValidatingObject.

◆ ThrowOnValidationError()

void OpenTap.ValidatingObject.ThrowOnValidationError ( bool ignoreDisabledProperties)
inlineprotected

Checks all validation rules on this object (Rules) and throws an AggregateException on errors.

Parameters
ignoreDisabledPropertiesIf true, ignores Rules related to properties that are disabled or hidden as a result of EnabledIfAttribute or Enabled<T>.
Exceptions
AggregateExceptionThrown when any Rules on this object are invalid. This exception contains an ArgumentException for each invalid setting.

OpenTAP 9.34 API built Wed Jul 1 2026 09:21:15