예제 #1
0
        public GeoCoordinate GetLatestGeoCoordinateByDevice(Device device)
        {
            string userName = "";

            if (ServiceSecurityContext.Current != null)
            {
                userName = ServiceSecurityContext.Current.PrimaryIdentity.Name;
            }
            IdentifiedDevice idd = new IdentifiedDevice(userName, device);

            return(geoDictionary[idd]);
        }
예제 #2
0
        public void UpdateGeoCoordinate(Device device, GeoCoordinate geoCoor)
        {
            string userName = "";

            if (ServiceSecurityContext.Current != null)
            {
                userName = ServiceSecurityContext.Current.PrimaryIdentity.Name;
            }
            else
            {
                // TODO: Throw fault exception
            }

            IdentifiedDevice idd = new IdentifiedDevice(userName, device);

            geoDictionary.Upsert(idd, geoCoor);
        }
예제 #3
0
        public GeoCoordinate GetLatestGeoCoordinateByUserNameAndDevice(string userName, Device device)
        {
            IdentifiedDevice idd = new IdentifiedDevice(userName, device);

            return(geoDictionary[idd]);
        }