public DashboardViewModel(IDIContainer container, IAuthorizationManager authManager, INavigationService navigationService, ILocationHelper locationHelper, ILog log) { _authManager = authManager; _navigationService = navigationService; _locationHelper = locationHelper; _log = log; Client.Me().ContinueWith(t => { Me = t.Result.Response; }); Client.Vehicles().ContinueWith(t => { foreach (var v in t?.Result?.Response?.Data) { OnNext(v); } }); _vehicleObservable = Client.WatchVehicles(); _vehicleObservable.Subscribe(this); LogoutCommand = container.Resolve <IRelayCommand <object> >(); LogoutCommand.ExecuteAction = async b => { await authManager.Logout(); _navigationService.Navigate(this, "Logout", null); }; MapZoomLevel = 7; }
public SitemapMiddleware(SitemapSettings a, ISitemapProvider b, IActionDescriptorCollectionProvider c, ILocationHelper d) { Settings = a; DataProvider = b; ActionDescriptors = c.ActionDescriptors.Items; LocationHelper = d; Serializer = new XmlSerializer(typeof(SitemapRoot)); Namespaces = new XmlSerializerNamespaces(); Namespaces.Add(string.Empty, "http://www.sitemaps.org/schemas/sitemap/0.9"); }
private void OpenSettings() { try { ILocationHelper locService = DependencyService.Get <ILocationHelper>(); locService.OpenSettings(); } catch (Exception ex) { EbLog.Error("failed to open location settings in [GoogleMap] view, " + ex.Message); } }
public CooksController( IMapper mapper, IRepository <Cook> cookRepo, IFoodBusinessRegistrationRepository <FoodBusinessRegistration> foodBusRepo, IEntityValidator <CookDto> cookValidator, IEntityValidator <FoodBusinessRegistrationValidatorModel> foodBusValidator, ILocationHelper locationHelper ) { _mapper = mapper; _cookRepo = cookRepo; _foodBusRepo = foodBusRepo; _cookValidator = cookValidator; _foodBusValidator = foodBusValidator; _locationHelper = locationHelper; }
public RobotsMiddleware(SitemapSettings settings, ILocationHelper locationHelper) { var sw = new Utf8StringWriter(); foreach (var item in settings.GetUserAgents()) { sw.Write("User-agent: {0}\n", item.UserAgent); foreach (var allow in item.Allows) { sw.Write("Allow: {0}\n", allow); } foreach (var disallow in item.Disallows) { sw.Write("Disallow: {0}\n", disallow); } sw.WriteLine(); } sw.Write("Sitemap: " + locationHelper.GetSitemapUrl(settings.SitemapPath)); Content = sw.ToString(); }
public LocationController(ILocationHelper locationHelper) { this.locationHelper = locationHelper; }
public MyCustomSitemapProvider(ILocationHelper locationHelper) { _locationHelper = locationHelper; }
public ForegroundService() { locationHelper = DependencyService.Get <ILocationHelper>(); }
public MainPage() { InitializeComponent(); _foregroundManager = DependencyService.Get <IForegroundManager>(); _locationHelper = DependencyService.Get <ILocationHelper>(); }