Class CommonExtension
Common Extensions.
Inheritance
Inherited Members
Namespace: OmicronLab.MaterialAnalyzer.AutomationInterface.Extensions
Assembly: OmicronLab.MaterialAnalyzer.AutomationInterface.dll (1.60.627.0)
Syntax
public static class CommonExtension
Methods
Convert(FdsPdcConversionTime)
Converts the specified conversion period.
Declaration
public static ConversionSettings.LookAhead Convert(this FdsPdcConversionTime conversionPeriod)
Parameters
Type | Name | Description |
---|---|---|
FdsPdcConversionTime | conversionPeriod | The conversion period. |
Returns
Type | Description |
---|---|
ConversionSettings.LookAhead |
Convert(MidLayer.Enumerations.DeviceStatus)
Converts the specified status.
Declaration
public static DeviceStatus Convert(this MidLayer.Enumerations.DeviceStatus status)
Parameters
Type | Name | Description |
---|---|---|
MidLayer.Enumerations.DeviceStatus | status | The status. |
Returns
Type | Description |
---|---|
DeviceStatus | The converted status. |
Convert(TrendAnalysis.Trend)
Converts the specified trend.
Declaration
public static Trend Convert(this TrendAnalysis.Trend trend)
Parameters
Type | Name | Description |
---|---|---|
TrendAnalysis.Trend | trend | The trend. |
Returns
Type | Description |
---|---|
Trend |
GetProperties(Object, BindingFlags)
Gets the properties of the related object.
Declaration
public static List<PropertyInfo> GetProperties(this object obj, BindingFlags bindingFlags)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object. |
BindingFlags | bindingFlags | The binding flags. |
Returns
Type | Description |
---|---|
List<PropertyInfo> |
GetProperties<T>(Object, BindingFlags)
Gets the properties of the related object of a specified type.
Declaration
public static List<PropertyInfo> GetProperties<T>(this object obj, BindingFlags bindingFlags)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object. |
BindingFlags | bindingFlags | The binding flags. |
Returns
Type | Description |
---|---|
List<PropertyInfo> |
Type Parameters
Name | Description |
---|---|
T | The specified property type. |
IsBetween(Int32, Int32, Int32)
Checks whether value is within the specified boundaries.
Declaration
public static bool IsBetween(this int value, int lowerBoundary, int upperBoundary)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value | the value to be checked. |
System.Int32 | lowerBoundary | the lower boundary of the interval. |
System.Int32 | upperBoundary | the upper boundary of the interval. |
Returns
Type | Description |
---|---|
System.Boolean | true, if the value is inside the interval, false otherwise. |
IsBetween(Int32, Int32, Int32, Boolean, Boolean)
Checks whether value is within the specified boundaries.
Declaration
public static bool IsBetween(this int value, int lowerBoundary, int upperBoundary, bool includingLower, bool includingUpper)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value | the value to be checked. |
System.Int32 | lowerBoundary | the lower boundary of the interval. |
System.Int32 | upperBoundary | the upper boundary of the interval. |
System.Boolean | includingLower | if true, the interval includes the lower boundary, otherwise it is not included. |
System.Boolean | includingUpper | if true, the interval includes the upper boundary, otherwise it is not included. |
Returns
Type | Description |
---|---|
System.Boolean | true, if the value is inside the interval, false otherwise. |
ToApplyState(Boolean, ApplyState)
Converts a bool to the recorder state.
Declaration
public static ApplyState ToApplyState(this bool state, ApplyState falseCondition = null)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | state | The state to be converted. |
ApplyState | falseCondition | The false condition. |
Returns
Type | Description |
---|---|
ApplyState |
ToArgumentException(String, Object[])
To the argument exception.
Declaration
public static ArgumentException ToArgumentException(this string message, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message. |
System.Object[] | args | The arguments for the String.Format. |
Returns
Type | Description |
---|---|
System.ArgumentException |
ToBaseFdsResult(FdsCurveValue, Double)
Converts a FdsCurveValue to a BaseFdsResult.
Declaration
public static BaseFdsResult ToBaseFdsResult(this FdsCurveValue curveValue, double vacuumCapacitance)
Parameters
Type | Name | Description |
---|---|---|
FdsCurveValue | curveValue | The curve value. |
System.Double | vacuumCapacitance | The vacuum capacitance. |
Returns
Type | Description |
---|---|
BaseFdsResult |
ToRecorderState(MonitorStatus)
Converts a monitor state to a recorder state.
Declaration
public static RecorderState ToRecorderState(this MonitorStatus state)
Parameters
Type | Name | Description |
---|---|---|
MonitorStatus | state | The monitor state. |
Returns
Type | Description |
---|---|
RecorderState |
ToStopState(Boolean, StopState)
Converts a bool to the stop state.
Declaration
public static StopState ToStopState(this bool state, StopState falseCondition = null)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | state | The state to be converted. |
StopState | falseCondition | The false condition. |
Returns
Type | Description |
---|---|
StopState |
WorkDone(PreMeasurementStatus)
Checks if the pre-measurement is finished.
Declaration
public static bool WorkDone(this PreMeasurementStatus state)
Parameters
Type | Name | Description |
---|---|---|
PreMeasurementStatus | state | The pre-measurement state. |
Returns
Type | Description |
---|---|
System.Boolean |