Ejemplo n.º 1
0
        public async Task <object> LastLocation(Guid sheepId)
        {
            var viewer   = TrackerConnectionFactory.CreateLocationViewer();
            var location = await(viewer.GetLastSheepLocation(sheepId));

            return(location == null ? null : new { Latitude = location.Value.Key, Longitude = location.Value.Value });
        }
Ejemplo n.º 2
0
        public async Task <object> LastLocation(Guid orderId)
        {
            var viewer   = TrackerConnectionFactory.CreateLocationViewer();
            var location = await viewer.GetLastReportingLocation(orderId);

            if (location == null)
            {
                return(null);
            }
            return(new { Latitude = location.Value.Key, Longitude = location.Value.Value });
        }
        public async Task <DateTime?> LastSeen(Guid sheepId)
        {
            var viewer = TrackerConnectionFactory.CreateLocationViewer();

            return(await viewer.GetLastReportTime(sheepId));
        }