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]); }
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); }
public GeoCoordinate GetLatestGeoCoordinateByUserNameAndDevice(string userName, Device device) { IdentifiedDevice idd = new IdentifiedDevice(userName, device); return(geoDictionary[idd]); }