Esempio n. 1
0
        public override void Set(ValuesResults results, JToken token)
        {
            var values      = (JArray)token["distinct-value"];
            var coordsValue = (string)values[0];

            Debug.Assert(coordsValue != null);

            var coords    = coordsValue.Split(',').Select(c => double.Parse(c)).ToArray();
            var longFirst = results.Type == "xs:long-lat-point";

            Frequency = (int)token["frequency"];
            Lat       = coords[longFirst ? 1 : 0];
            Long      = coords[longFirst ? 0 : 1];

            _tupleValues = values.Values <string>().Skip(1).ToArray();

            base.Set(results, token);
        }
Esempio n. 2
0
        public override void Set(ValuesResults results, JToken token)
        {
            var coordsValue = (string)token["_value"];

            Debug.Assert(coordsValue != null);

            var coords    = coordsValue.Split(',').Select(c => double.Parse(c)).ToArray();
            var longFirst = results.Type == "xs:long-lat-point";

            Frequency = (int)token["frequency"];
            // TODO: investigate indexing if its correct
            //Lat = coords[longFirst ? 1 : 0];
            //Long = coords[longFirst ? 0 : 1];
            Lat  = coords[0];
            Long = coords[1];

            base.Set(results, token);
        }
Esempio n. 3
0
 public virtual void Set(ValuesResults results, JToken token)
 {
     Token = token;
 }
Esempio n. 4
0
 public Enumerator(ValuesResults valuesResults, JToken resultsArray)
 {
     _valuesResults = valuesResults;
     _resultsArray  = resultsArray;
 }