File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -104,5 +104,9 @@ public SensorModes Mode
104104 /// </summary>
105105 public bool ? Float { get ; set ; }
106106
107+ /// <summary>
108+ /// Defines the custom lookup to use to change the value to text.
109+ /// </summary>
110+ public string ValueLookup { get ; set ; }
107111 }
108112}
Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ private string ConvertToJson(Result result)
112112 }
113113
114114 json . AddJsonValue ( "value" , result . Value ) ;
115+ json . AddXmlValue ( "valueLookup" , result . ValueLookup ) ;
115116
116117 json . Append ( "}" ) ;
117118 return json . ToString ( ) ;
Original file line number Diff line number Diff line change @@ -114,9 +114,13 @@ private string ConvertToXml(Result result)
114114 if ( result . Float . HasValue )
115115 {
116116 xml . AddXmlValue ( "float" , result . Float . Value ) ;
117- }
117+ }
118118
119119 xml . AddXmlValue ( "value" , result . Value ) ;
120+ if ( ! string . IsNullOrWhiteSpace ( result . ValueLookup ) )
121+ {
122+ xml . AddXmlValue ( "valueLookup" , result . ValueLookup ) ;
123+ }
120124
121125 xml . Append ( "</result>" ) ;
122126 return xml . ToString ( ) ;
You can’t perform that action at this time.
0 commit comments