Table of Contents

Class Validate

Namespace
Csra.TheLib
Assembly
Csra.dll
public class Validate : ILib.IValidate
Inheritance
Validate
Implements
Inherited Members

Methods

Dc(Pins, bool?, DcOutputMode?, double?, double?, double?, double?, double?, double?, DcMeterMode?, double?, double?, double?, double?, double?, double?, double?, double?, double?, bool?, bool?, double?, double?, double?, double?, double?, bool?, double?, double?)

Validate arguments within Test Method Templates.

public virtual void Dc(Pins pins, bool? gate = null, DcOutputMode? mode = null, double? voltage = null, double? voltageAlt = null, double? current = null, double? voltageRange = null, double? currentRange = null, double? forceBandwidth = null, DcMeterMode? meterMode = null, double? meterVoltageRange = null, double? meterCurrentRange = null, double? meterBandwidth = null, double? sourceFoldLimit = null, double? sinkFoldLimit = null, double? sourceOverloadLimit = null, double? sinkOverloadLimit = null, double? sampleRate = null, double? sampleSize = null, bool? voltageAltOutput = null, bool? bleederResistor = null, double? complianceBoth = null, double? compliancePositive = null, double? complianceNegative = null, double? clampHiV = null, double? clampLoV = null, bool? highAccuracy = null, double? settlingTime = null, double? hardwareAverage = null)

Parameters

pins Pins

Pins parameter to be validated.

gate bool?

Optional. Gate parameter to be validated.

mode DcOutputMode?

Optional. Mode parameter to be validated.

voltage double?

Optional. Voltage parameter to be validated.

voltageAlt double?

Optional. VoltageAlt parameter to be validated.

current double?

Optional. Current parameter to be validated.

voltageRange double?

Optional. Voltage Range parameter to be validated.

currentRange double?

Optional. Current Range parameter to be validated.

forceBandwidth double?

Optional. Force Bandwidth parameter to be validated.

meterMode DcMeterMode?

Optional. Meter Mode parameter to be validated.

meterVoltageRange double?

Optional. Meter Voltage Range parameter to be validated.

meterCurrentRange double?

Optional. Meter Current Range parameter to be validated.

meterBandwidth double?

Optional. Meter Bandwidth parameter to be validated.

sourceFoldLimit double?

Optional. Source Fold Limit parameter to be validated.

sinkFoldLimit double?

Optional. Sink Fold Limit parameter to be validated.

sourceOverloadLimit double?

Optional. Source Overload Limit parameter to be validated.

sinkOverloadLimit double?

Optional. Sink Overload Limit parameter to be validated.

sampleRate double?

Optional. Sample rate parameter to be validated.

sampleSize double?

Optional. Sample size parameter to be validated.

voltageAltOutput bool?

Optional. Voltage Alt Output parameter to be validated.

bleederResistor bool?

Optional. Bleeder Resistor parameter to be validated.

complianceBoth double?

Optional. Compliance Both parameter to be validated.

compliancePositive double?

Optional. Compliance Positive parameter to be validated.

complianceNegative double?

Optional. Compliance Negative parameter to be validated.

clampHiV double?

Optional. Clamp High V parameter to be validated.

clampLoV double?

Optional. Clamp Low V parameter to be validated.

highAccuracy bool?

Optional. High Accuracy parameter to be validated.

settlingTime double?

Optional. Settling Time parameter to be validated.

hardwareAverage double?

Optional. Hardware Average parameter to be validated.

Enum<T>(string, string, out T)

Checks if the provided string can be parsed to the specified enum type and create the enum value.

public virtual bool Enum<T>(string value, string argumentName, out T enumValue) where T : struct, Enum

Parameters

value string

The string to parse for. Case-Insensitive, specify only the enum member part.

argumentName string

The argument name used to indicate to IG-XL which test instance parameter failed.

enumValue T

The enumeration value to output in the event that the provided value was successfully parsed in the provided enumeration.

Returns

bool

true if the value was found within the provided Enumeration and successfully parsed; otherwise, false.

Type Parameters

T

The existing Enumeration to be parsed.

Fail(string, string)

Raises an unconditional validation error.

public virtual void Fail(string problemReasonResolutionMessage, string argumentName)

Parameters

problemReasonResolutionMessage string

Validation failure message clearly describing the problem, reason, and resolution message.

argumentName string

The argument name used to indicate to IG-XL which test instance parameter failed.

GetObjectByClassName<T>(string, out T)

Creates an instance of the class passed by its fully-qualified name

public virtual bool GetObjectByClassName<T>(string fullyQualifiedClassName, out T instance) where T : class

Parameters

fullyQualifiedClassName string

Fully qualified name of the class to be instantiated.

instance T

Object to be created if the fullyQualifiedClassName is found to be valid.

Returns

bool

true if the fullyqualifiedClassName was found to match an existing class and the new object was created; otherwise, false.

Type Parameters

T

Type of the returned object.

GreaterOrEqual<T>(T, T, string)

Checks if a numeric value is greater or equal to a bound.

public virtual bool GreaterOrEqual<T>(T value, T boundary, string argumentName) where T : IComparable<T>

Parameters

value T

The value to be checked against the provided boundary.

boundary T

The boundary that the value must be greater than or equal to.

argumentName string

The argument name used to indicate to IG-XL which test instance parameter failed.

Returns

bool

true if the value is greater than or equal to the provided boundary; otherwise, false.

Type Parameters

T

The type specified for the provided parameters.

GreaterThan<T>(T, T, string)

Checks if a numeric value is greater than the provided boundary.

public virtual bool GreaterThan<T>(T value, T boundary, string argumentName) where T : IComparable<T>

Parameters

value T

The value to be checked against the provided boundary.

boundary T

The boundary that the value must be greater than.

argumentName string

The argument name used to indicate to IG-XL which test instance parameter failed.

Returns

bool

true if the 'value' is greater than the provided boundary; otherwise, false.

Type Parameters

T

The type specified for the provided parameters.

InRange<T>(T, T, T, string)

Checks if a numeric value is within a range (including).

public virtual bool InRange<T>(T value, T from, T to, string argumentName) where T : IComparable<T>

Parameters

value T

The value to be checked against the provided upper and lower threshold.

from T

The lower threshold.

to T

The upper threshold.

argumentName string

The argument name used to indicate to IG-XL which test instance parameter failed.

Returns

bool

true if the value is within the provided range; otherwise, false.

Type Parameters

T

The type specified for the provided parameters.

IsTrue(bool, string, string)

Checks for whether condition == true.

public virtual bool IsTrue(bool condition, string problemReasonResolutionMessage, string argumentName)

Parameters

condition bool

Condition to be checked.

problemReasonResolutionMessage string

Validation failure message describing the problem, reason, and resolution.

argumentName string

The argument name used to indicate to IG-XL which test instance parameter failed.

Returns

bool

true if the condition == true; Otherwise, false.

LessOrEqual<T>(T, T, string)

Checks if a numeric value is less or equal to a bound.

public virtual bool LessOrEqual<T>(T value, T boundary, string argumentName) where T : IComparable<T>

Parameters

value T

The value to be checked against the provided boundary.

boundary T

The boundary that the value must be greater than or equal to.

argumentName string

The argument name used to indicate to IG-XL which test instance parameter failed.

Returns

bool

true if the value is less than or equal to the provided boundary; otherwise, false.

Type Parameters

T

The type specified for the provided parameters.

LessThan<T>(T, T, string)

Checks if a numeric value is less than the provided boundary.

public virtual bool LessThan<T>(T value, T boundary, string argumentName) where T : IComparable<T>

Parameters

value T

The value to be checked against the provided boundary.

boundary T

The boundary that the value must be less than.

argumentName string

The argument name used to indicate to IG-XL which test instance parameter failed.

Returns

bool

true if the value is less than the provided boundary; otherwise, false.

Type Parameters

T

The type specified for the provided parameters.

MultiCondition<T>(string, Func<string, T>, string, out T[], int?)

Checks multi-condition validity and creates the data array.

public virtual bool MultiCondition<T>(string csv, Func<string, T> parser, string argumentName, out T[] conditions, int? referenceCount = null)

Parameters

csv string

Comma separated values to split and parse.

parser Func<string, T>

Delegate used to parse comma separated list.

argumentName string

The argument name used to indicate to IG-XL which test instance parameter failed.

conditions T[]

Output Array of parsed values sourced from the provided string.

referenceCount int?

Optional. If specified, the reference count to verify. Will report an error if the resulting array size is >1 (SingleCondition) and does not match (MultiCondition).

Returns

bool

true if the output array was successfully created; otherwise, false.

Type Parameters

T

The target (output) type of the parser function.

MultiCondition<TEnum>(string, string, out TEnum[], int?)

Checks multi-condition validity and creates the data array.

public virtual bool MultiCondition<TEnum>(string csv, string argumentName, out TEnum[] conditions, int? referenceCount = null) where TEnum : struct, Enum

Parameters

csv string

Comma separated values to split and parse. Case-Insensitive, specify only the enum member part.

argumentName string

The argument name used to indicate to IG-XL which test instance parameter failed.

conditions TEnum[]

Output Array of parsed values sourced from the provided string.

referenceCount int?

Optional. If specified, the reference count to verify. Will report an error if the resulting array size is >1 (SingleCondition) and does not match (MultiCondition).

Returns

bool

true if the output array was successfully created; otherwise, false.

Type Parameters

TEnum

Pattern(Pattern, string, out List<PatternInfo>, bool)

Checks for valid pattern spec and creates patternInfo object.

public virtual bool Pattern(Pattern pattern, string argumentName, out List<PatternInfo> patternInfo, bool threading = true)

Parameters

pattern Pattern

The pattern file to check.

argumentName string

The argument name used to indicate to IG-XL which test instance parameter failed.

patternInfo List<PatternInfo>

A new PatternInfo object list containing the provided patterns.

threading bool

Optional. Indicate whether threading should be used. Validation will fail if threading is not supported by the pattern.

Returns

bool

true if the pattern exists and creates the new PatternInfo() object; otherwise, false.

Pins(PinList, string, out Pins)

Checks for C#RA supported pin spec and creates the object.

public virtual bool Pins(PinList pinList, string argumentName, out Pins pins)

Parameters

pinList PinList
argumentName string

The argument name used to indicate to IG-XL which test instance parameter failed.

pins Pins

A new Pins object containing all of the resovled pins.

Returns

bool

true if the pinList was comprised of valid pins and creates the Pins() object; otherwise, false.