/// <summary> /// [Experimental] Gets the display names for possible values of this capability. /// </summary> /// <returns></returns> public IEnumerable <string> GetLabelEnum() { var list = new List <object>(); using (TWCapability cap = new TWCapability(Capability)) { var rc = _source.DGControl.Capability.GetLabelEnum(cap); if (rc == ReturnCode.Success) { return(CapabilityReader.ReadValue(cap).EnumerateCapValues().Select(o => o.ToString())); } } return(Enumerable.Empty <string>()); }
/// <summary> /// [Experimental] Gets the help value of this capability. /// </summary> /// <returns></returns> public string GetHelp() { object value = null; using (TWCapability cap = new TWCapability(Capability)) { var rc = _source.DGControl.Capability.GetHelp(cap); if (rc == ReturnCode.Success) { var read = CapabilityReader.ReadValue(cap); switch (read.ContainerType) { case ContainerType.OneValue: // most likely not correct value = read.OneValue; break; } } } return(value == null ? null : value.ToString()); }