public UpcomingMoviePageViewModel(IApplicationServices <Results> rService, IApplicationServices <Genres> gService, IApplicationServices <Images> imgService, ISettings setSetvices, IDefaultSettings defSetService, IUIFunctions uiFuncService, INavigationService navigationService, IMobileAnalyticsFunctions analitycFuncService, IMobileCenterCrashes mbcService) { _navigationService = navigationService; resultsService = rService; genresService = gService; imagesService = imgService; settingsService = setSetvices; defaultSettingsService = defSetService; uiFunctionsService = uiFuncService; analyticsFunctionsService = analitycFuncService; mobileCenterCrashesService = mbcService; GetMoreItensCommand = new DelegateCommand(LoadMoreItens); ItemTappedCommand = new DelegateCommand <Results>((obj) => MovieDetails(obj)); SearchMovieCommand = new DelegateCommand <string>((obj) => SearchMovie(obj)); defaultSettingsService.ConfigureInitialSettings(); GetMovieList(); }
/// <summary> /// Saves Settings object as Default (Design-time) Settings. /// </summary> /// /// <remarks> /// In Unity the file will be saved in a Assets\\Resources Folder in the editor environment (As /// resources are read-only at run-time). /// </remarks> /// /// <returns> /// true if it succeeds, false if it fails. /// </returns> public Boolean SaveDefaultSettings(bool force) { IDefaultSettings ds = getInterface <IDefaultSettings>(); if (ds != null && hasSettings && (force || !ds.HasDefaultSettings(Class, Id))) { ds.SaveDefaultSettings(Class, Id, SettingsToXml()); return(true); } return(false); }
/// <summary> /// Loads Settings object from Default (Design-time) Settings. /// </summary> /// /// <remarks> /// In Unity Resources.Load() must be used and the files will be loaded a Assets\\Resources /// Folder. /// </remarks> /// /// <returns> /// true if it succeeds, false if it fails. /// </returns> public Boolean LoadDefaultSettings() { IDefaultSettings ds = getInterface <IDefaultSettings>(); if (ds != null && hasSettings && ds.HasDefaultSettings(Class, Id)) { String xml = ds.LoadDefaultSettings(Class, Id); Settings = SettingsFromXml(xml); return(true); } return(false); }
public ConfigurationServiceBase(IPersistenceService <T> persister, IDefaultSettings <T> defaultSettings) { _persister = persister; Defaults = defaultSettings; }