public bool TryGetOptionalEnumValue <T>(ParamName paramName, out T value) where T : struct { if (ValueSet.TryGetValue(paramName.ToString(), out object rawValue)) { return(TryConvertEnumValue(paramName, rawValue, out value)); } value = default(T); return(false); }
private bool GetRequiredValue(ParamName paramName, out object value) { if (ValueSet.TryGetValue(paramName.ToString(), out value)) { return(true); } LastError = ServiceCommandResponse.CreateError( CommandName, ServiceErrorInfo.MissingRequiredMessageValue(paramName)); return(false); }
public bool GetComParameterValue(ParamName name, out int result) { ComParameter param = GetComParameterByName(name.ToString()); if (param is null) { result = 0; return(false); } else { result = param.ComParamValue; return(true); } }
public override string ToString() { return(ParamName.ToString()); }
public int GetComParameterValue(ParamName name) { return(GetComParameterByName(name.ToString()).ComParamValue); }