Show / Hide Table of Contents

Class VariableExtensions

Helper methods to access information from a DDI Variable.

Inheritance
object
VariableExtensions
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Algenta.Colectica.Model.Ddi.Utility
Assembly: Algenta.Colectica.Model.Ddi.dll
Syntax
public static class VariableExtensions

Methods

AreAllNonMissingCodesNumeric(CodeList)

Returns whether all the codes in the list are numeric or decimal.

Declaration
public static bool AreAllNonMissingCodesNumeric(this CodeList codeList)
Parameters
Type Name Description
CodeList codeList
Returns
Type Description
bool

GatherAllCodes(Variable)

Gathers codes used in a variable, from the CodeRepresentation and the defined missing values.

Declaration
public static List<Code> GatherAllCodes(this Variable variable)
Parameters
Type Name Description
Variable variable
Returns
Type Description
List<Code>

GetAllDefinedMissingValues(Variable)

Get a list of all defined missing values as a string

Declaration
public static List<string> GetAllDefinedMissingValues(this Variable variable)
Parameters
Type Name Description
Variable variable
Returns
Type Description
List<string>

GetDefinedMissingDoubleValues(Variable)

Gets a list of missing numeric values defined for the variable.

Declaration
public static List<double> GetDefinedMissingDoubleValues(this Variable variable)
Parameters
Type Name Description
Variable variable
Returns
Type Description
List<double>

GetDefinedMissingStringValues(Variable)

Gets a list of missing string values defined for the variable.

Declaration
public static List<string> GetDefinedMissingStringValues(this Variable variable)
Parameters
Type Name Description
Variable variable
Returns
Type Description
List<string>

GetLabelForCategoryValue(string, IEnumerable<Code>)

Get the best display label for a code/category pair

Declaration
public static string GetLabelForCategoryValue(string value, IEnumerable<Code> codes)
Parameters
Type Name Description
string value
IEnumerable<Code> codes
Returns
Type Description
string

GetNumericFormatCode(Variable)

Get a format string for a numeric variable, based on decimal positions

Declaration
public static string GetNumericFormatCode(this Variable variable)
Parameters
Type Name Description
Variable variable
Returns
Type Description
string

ValueIsInMissing(List<string>, string)

Determines if a value is in a missing value list, or is negative or positive infinity or a period (.)

Declaration
public static bool ValueIsInMissing(List<string> missingValues, string value)
Parameters
Type Name Description
List<string> missingValues
string value
Returns
Type Description
bool
In this article
Back to top Generated by DocFX