public static IIntProperty CreateInt(IDDK ddk, IStruct structure, string name, string helpText = null) { ITypeInt typeInt = CreateIntType(ddk); IIntProperty result = structure.CreateProperty(name, helpText, typeInt); return(result); }
public static IIntProperty CreateEnum <T>(IDDK ddk, IStruct structure, string name, T value, string helpText = null) { ITypeInt typeInt = CreateEnumType <T>(ddk); IIntProperty result = structure.CreateProperty(name, string.Empty, typeInt); UpdateEnumProperty(result, value, helpText); return(result); }
public static IStringProperty CreateString(IDDK ddk, IStruct structure, string name, string helpText = null, int valueMaxLength = 300) { if (valueMaxLength <= 0) { throw new ArgumentOutOfRangeException("Parameter valueMaxLength must be > 0"); } return(structure.CreateProperty(name, helpText, ddk.CreateString(valueMaxLength))); }
public static IDoubleProperty CreateDouble(IDDK ddk, IStruct structure, string name, Nullable <UnitConversion.PhysUnitEnum> unit = null, string helpText = null, double minValue = double.MinValue, double maxValue = double.MaxValue, int precision = 3) { ITypeDouble typeDouble = CreateDoubleType(ddk, unit, minValue, maxValue, precision); IDoubleProperty result = structure.CreateProperty(name, helpText, typeDouble); return(result); }