static double GetConstant(string constantName) { var handle = Dlfcn.dlopen(Constants.CoreLocationLibrary, 0); try { return(Dlfcn.GetDouble(handle, constantName)); } finally { Dlfcn.dlclose(handle); } }
static CLLocation() { var handle = Libraries.CoreLocation.Handle; if (handle == IntPtr.Zero) { return; } AccurracyBestForNavigation = Dlfcn.GetDouble(handle, "kCLLocationAccuracyBestForNavigation"); AccuracyBest = Dlfcn.GetDouble(handle, "kCLLocationAccuracyBest"); AccuracyNearestTenMeters = Dlfcn.GetDouble(handle, "kCLLocationAccuracyNearestTenMeters"); AccuracyHundredMeters = Dlfcn.GetDouble(handle, "kCLLocationAccuracyHundredMeters"); AccuracyKilometer = Dlfcn.GetDouble(handle, "kCLLocationAccuracyKilometer"); AccuracyThreeKilometers = Dlfcn.GetDouble(handle, "kCLLocationAccuracyThreeKilometers"); }
static CLLocation() { var handle = Dlfcn.dlopen(Constants.CoreLocationLibrary, 0); if (handle == IntPtr.Zero) { return; } try { AccurracyBestForNavigation = Dlfcn.GetDouble(handle, "kCLLocationAccuracyBestForNavigation"); AccuracyBest = Dlfcn.GetDouble(handle, "kCLLocationAccuracyBest"); AccuracyNearestTenMeters = Dlfcn.GetDouble(handle, "kCLLocationAccuracyNearestTenMeters"); AccuracyHundredMeters = Dlfcn.GetDouble(handle, "kCLLocationAccuracyHundredMeters"); AccuracyKilometer = Dlfcn.GetDouble(handle, "kCLLocationAccuracyKilometer"); AccuracyThreeKilometers = Dlfcn.GetDouble(handle, "kCLLocationAccuracyThreeKilometers"); } finally { Dlfcn.dlclose(handle); } }