public MainViewModel(IStorageService storageService)
 {
     if (!IsInDesignModeStatic)
     {
         _storageService = storageService;
     }
 }
        public ItemRepository(IStorageService storageService)
        {
            _storageService = storageService.Local;
            _storageFolder = ApplicationData.Current.LocalFolder;

            LoadItems().ConfigureAwait(false);
        }
Example #3
0
 public HomeViewModel(IStorageService storageService, IMvxMessenger messenger, IPopupHelper helper, IMessageService messageService)
     : base(messenger, helper)
 {
     _storageService = storageService;
     _messageService = messageService;
     SelectContactCommand = new MvxCommand<ContactListItem>(SelectContactCommandAction);
 }
Example #4
0
		public ApiController(IErpService service, IStorageService storage) : base(service)
		{
			Storage = storage;
			recMan = new RecordManager(service);
			secMan = new SecurityManager(service);
			entityManager = new EntityManager(storage);
		}
        // *** Public Methods ***********************************************
        public FileSystem(string svc, string accessKeyId, string secretAccessKey, string bucket, string acl)
        {
            if(svc == "REST") {
                _svc = new RestStorageService();
            } else if(svc == "SOAP") {
                _svc = new SoapStorageService();
            } else {
                throw new ArgumentException();
            }

            if(acl == "PrivateOnly") {
                _acl = AWSGrant.PrivateOnly;
            } else if(acl == "PublicRead") {
                _acl = AWSGrant.PublicRead;
            } else if(acl == "PublicWrite") {
                _acl = AWSGrant.PublicWrite;
            } else {
                throw new ArgumentException();
            }

            _svc.AccessKeyId     = accessKeyId;
            _svc.SecretAccessKey = secretAccessKey;

            _bucket = bucket;
            _root   = new DirectoryImpl(this, null, "", _bucket);
        }
#pragma warning disable 4014
        public SettingsRepository(IStorageService storageService, ISqliteService sqliteService, IPlatformCodeService platformCodeService)
        {
            _storageService = storageService;
            _sqliteService = sqliteService;
            _platformCodeService = platformCodeService;
            Initialize();
        }
 public CssStatsStorageService(IStorageService storageService, IDateTimeProvider dateTimeProvider, IHumanInterface ux, ICssStatsFileNameEvaluator cssStatsFileNameEvaluator)
 {
     CssStatsFileNameEvaluator = cssStatsFileNameEvaluator;
     Ux = ux;
     DateTimeProvider = dateTimeProvider;
     StorageService = storageService;
 }
        /// <summary>
        /// Initializes a new instance of the PlaylistViewModel class.
        /// </summary>
        public NowPlayingViewModel(INavigationService navigationService, IConnectionManager connectionManager, IStorageService storageService)
            :base (navigationService, connectionManager)
        {
            _playlistChecker = new DispatcherTimer { Interval = new TimeSpan(0, 0, 3) };
            _playlistChecker.Tick += PlaylistCheckerOnTick;

            Playlist = new ObservableCollection<PlaylistItem>();
            SelectedItems = new List<PlaylistItem>();
            if (IsInDesignMode)
            {
                Playlist = new ObservableCollection<PlaylistItem>
                {
                    new PlaylistItem {Artist = "John Williams", Album = "Jurassic Park OST", Id = 1, IsPlaying = true, TrackName = "Jurassic Park Theme"},
                    new PlaylistItem {Artist = "John Williams", Album = "Jurassic Park OST", Id = 2, IsPlaying = false, TrackName = "Journey to the Island"},
                    new PlaylistItem {Artist = "John Williams", Album = "Jurassic Park OST", Id = 10, IsPlaying = false, TrackName = "Incident at Isla Nublar"}
                };
                NowPlayingItem = Playlist[0];
            }
            else
            {
                _playlistHelper = new PlaylistHelper(storageService);
                BackgroundAudioPlayer.Instance.PlayStateChanged += OnPlayStateChanged;
                GetPlaylistItems();
                IsPlaying = BackgroundAudioPlayer.Instance.PlayerState == PlayState.Playing;
            }
        }
        public OpenWeatherMapService(
            IOutdoorTemperatureService outdoorTemperatureService,
            IOutdoorHumidityService outdoorHumidityService,
            IDaylightService daylightService,
            IWeatherService weatherService,
            IDateTimeService dateTimeService, 
            ISchedulerService schedulerService, 
            ISystemInformationService systemInformationService,
            ISettingsService settingsService, 
            IStorageService storageService)
        {
            if (outdoorTemperatureService == null) throw new ArgumentNullException(nameof(outdoorTemperatureService));
            if (outdoorHumidityService == null) throw new ArgumentNullException(nameof(outdoorHumidityService));
            if (daylightService == null) throw new ArgumentNullException(nameof(daylightService));
            if (weatherService == null) throw new ArgumentNullException(nameof(weatherService));
            if (dateTimeService == null) throw new ArgumentNullException(nameof(dateTimeService));
            if (systemInformationService == null) throw new ArgumentNullException(nameof(systemInformationService));
            if (settingsService == null) throw new ArgumentNullException(nameof(settingsService));
            if (storageService == null) throw new ArgumentNullException(nameof(storageService));

            _outdoorTemperatureService = outdoorTemperatureService;
            _outdoorHumidityService = outdoorHumidityService;
            _daylightService = daylightService;
            _weatherService = weatherService;
            _dateTimeService = dateTimeService;
            _systemInformationService = systemInformationService;
            _storageService = storageService;

            settingsService.CreateSettingsMonitor<OpenWeatherMapServiceSettings>(s => Settings = s);

            LoadPersistedData();

            schedulerService.RegisterSchedule("OpenWeatherMapServiceUpdater", TimeSpan.FromMinutes(5), Refresh);
        }
        public NewWorkoutViewModel(INavigationService navigationService, IStorageService storageService)
        {
            NavigationService = navigationService;
            StorageService = storageService;

            Exercises = new ObservableCollection<ExerciseConfiguration>();
        }
 protected SettingsViewModelBase(ISettingsRepository settingsRepository, IStorageService storageService)
 {
     _settingsRepository = settingsRepository;
     _storageService = storageService;
     
     if (!IsInDesignMode)
         Initialize();
     else
     {
         Name = "DesignName";
         Colors = new ObservableCollection<Color>()
         {
             new Color("F44336", "Red"),
             new Color("E91E63", "Pink"),
             new Color("9C27B0", "Purple"),
             new Color("673AB7", "Deep Purple"),
             new Color("F44336", "Red"),
             new Color("E91E63", "Pink"),
             new Color("9C27B0", "Purple"),
             new Color("673AB7", "Deep Purple"),
             new Color("F44336", "Red"),
             new Color("E91E63", "Pink"),
             new Color("9C27B0", "Purple"),
             new Color("673AB7", "Deep Purple")
         };
         SelectedColor = Colors[2];
     }
 }
Example #12
0
 public ProgramSettingsManager(ISystemEnvironment systemEnvironment, ILogService logService,
     IStorageService storageService)
 {
     _systemEnvironment = systemEnvironment;
     _storageService = storageService;
     _logService = logService;
 }
 public MoviesViewModel()
 {
     movieService = ServiceContainer.Resolve<IMovieService>();
     messageDialog = ServiceContainer.Resolve<IMessageDialog>();
     storageService = ServiceContainer.Resolve<IStorageService>();
     NeedsUpdate = true;
 }
Example #14
0
        public ShellForm(IKernel kernel)
        {
            Asserter.AssertIsNotNull(kernel, "kernel");

            _kernel = kernel;
            _applicationService = _kernel.Get<IApplicationService>();
            _storageService = _kernel.Get<IStorageService>();
            _settingsService = _kernel.Get<ISettingsService>();
            _siteService = _kernel.Get<ISiteService>();
            _controller = _kernel.Get<ShellController>();

            Asserter.AssertIsNotNull(_applicationService, "_applicationService");
            Asserter.AssertIsNotNull(_storageService, "_storageService");
            Asserter.AssertIsNotNull(_settingsService, "_settingsService");
            Asserter.AssertIsNotNull(_siteService, "_siteService");

            InitializeComponent();

            _siteService.Register(SiteNames.ContentSite, contentPanel);
            _siteService.Register(SiteNames.NavigationSite, navigationPanel);
            _siteService.Register(SiteNames.ContentActionsSite, contentActionPanel);

            SetStyle(ControlStyles.OptimizedDoubleBuffer |
                     ControlStyles.AllPaintingInWmPaint |
                     ControlStyles.ResizeRedraw, true);
        }
        public NotificationService(
            IDateTimeService dateTimeService, 
            IApiService apiService, 
            ISchedulerService schedulerService, 
            ISettingsService settingsService,
            IStorageService storageService,
            IResourceService resourceService)
        {
            if (dateTimeService == null) throw new ArgumentNullException(nameof(dateTimeService));
            if (apiService == null) throw new ArgumentNullException(nameof(apiService));
            if (schedulerService == null) throw new ArgumentNullException(nameof(schedulerService));
            if (settingsService == null) throw new ArgumentNullException(nameof(settingsService));
            if (storageService == null) throw new ArgumentNullException(nameof(storageService));
            if (resourceService == null) throw new ArgumentNullException(nameof(resourceService));

            _dateTimeService = dateTimeService;
            _storageService = storageService;
            _resourceService = resourceService;

            settingsService.CreateSettingsMonitor<NotificationServiceSettings>(s => Settings = s);

            apiService.StatusRequested += HandleApiStatusRequest;

            schedulerService.RegisterSchedule("NotificationCleanup", TimeSpan.FromMinutes(15), Cleanup);
        }
Example #16
0
        public MainModel(IGoogleAuthService googleAuthService, IStorageService storageService, ISystemTrayService systemTrayService)
        {
            _googleAuthService = googleAuthService;
            _storageService = storageService;
            _systemTrayService = systemTrayService;

            Load();
        }
 public JavaScriptStatsStorageService(IStorageService storageService, IDateTimeProvider dateTimeProvider, IHumanInterface ux, IRelevantAttributesEvaluator relevantAttributesEvaluator, IJavaScriptStatsFileNameEvaluator javaScriptStatsFileNameEvaluator)
 {
     JavaScriptStatsFileNameEvaluator = javaScriptStatsFileNameEvaluator;
     StorageService = storageService;
     DateTimeProvider = dateTimeProvider;
     Ux = ux;
     RelevantAttributesEvaluator = relevantAttributesEvaluator;
 }
Example #18
0
 public TileService(
     IStorageService storageService,
     ISettingsService settingsService)
 {
     _storageService = storageService;
     _settingsService = settingsService;
     _logger = new WinLogger("TileService");
 }
Example #19
0
 public void BeforeEachTest()
 {
     _firstInput = 0;
     _secondInput = 0;
     var mocker = new RhinoAutoMocker<Calculator>();
     _calculator = mocker.ClassUnderTest;
     _storageService = mocker.Get<IStorageService>();
 }
Example #20
0
        public Kernel(IStorageService storageImpl, IReaderService readerImpl)
        {
            this.storageService = storageImpl;
            this.readerService = readerImpl;

            sleepTime = Convert.ToInt32(Properties.Settings.Default["ScanForTasksSleep"]);
            Console.CancelKeyPress += Console_CancelKeyPress;
        }
Example #21
0
 public SettingsViewModel(ISubsonicService subsonicService, IToastNotificationService notificationService,
     IStorageService storageService, ICustomFrameAdapter navigationService)
 {
     _subsonicService = subsonicService;
     _notificationService = notificationService;
     _storageService = storageService;
     _navigationService = navigationService;
 }
 public ShowAndShareAroundMeViewModel(INavigationService navigationService, IStorageService storageService, IParkingAvailabilityService getParkingAvailabilityService, IGetPositionService getPositionService)
     : base(navigationService, storageService)
 {
     _getPositionService = getPositionService;
     _getParkingAvailabilityService = getParkingAvailabilityService;
     
     AvailableParkingSpace = 50;
 }
Example #23
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultMediaImageService" /> class.
 /// </summary>
 /// <param name="mediaFileService">The media file service.</param>
 /// <param name="storageService">The storage service.</param>
 /// <param name="repository">The repository.</param>
 /// <param name="unitOfWork">The unit of work.</param>
 /// <param name="sessionFactoryProvider">The session factory provider.</param>
 public DefaultMediaImageService(IMediaFileService mediaFileService, IStorageService storageService, IRepository repository, ISessionFactoryProvider sessionFactoryProvider, IUnitOfWork unitOfWork)
 {
     this.mediaFileService = mediaFileService;
     this.sessionFactoryProvider = sessionFactoryProvider;
     this.storageService = storageService;
     this.repository = repository;
     this.unitOfWork = unitOfWork;
 }
 public TileService(IConnectionManager connectionManager, IStorageService storageService)
 {
     _logger = new WPLogger(typeof(TileService));
     _logger.Info("Starting TileService");
     _connectionManager = connectionManager;
     _storageService = storageService.Local;
     Current = this;
 }
Example #25
0
        public SplashScreen(IKernel kernel)
        {
            InitializeComponent();

            _kernel = kernel;
            _applicationService = kernel.Get<IApplicationService>();
            _storageService = kernel.Get<IStorageService>();
        }
Example #26
0
        public Patcher(IKernel kernel)
        {
            _kernel = kernel;
            _storageService = kernel.Get<IStorageService>();
            _settingsService = kernel.Get<ISettingsService>();

            if (string.IsNullOrEmpty(_settingsService.UltimaOnlineDirectory))
                throw new Exception("ConnectUO was unable to find the directory that Ultima Online is installed to.");
        }
        public EntityRelationManager(IStorageService storageService)
        {
            if (storageService == null)
                throw new ArgumentNullException("storageService", "The storage service is required.");

            this.storageService = storageService;
            relationRepository = storageService.GetEntityRelationRepository();
            entityRepository = storageService.GetEntityRepository();
        }
Example #28
0
 public MainViewModel(ILocalDataService localDataService, IStorageService storageService,
     INavigationService navigationService,
     ILiveTileServiceWP8 liveTileService)
 {
     _localDataService = localDataService;
     _storageService = storageService;
     _navigationService = navigationService;
     _liveTileService = liveTileService;
 }
Example #29
0
 public CacheService(
     IStorageService storage,
     IAuthenticationService authenticationService,
     ILog logger)
 {
     _storage = storage;
     _authenticationService = authenticationService;
     _logger = logger;
 }
        public ApplicationBootstrapper(
			IInstanceService instanceService,
			IStorageService storageService,
			IMetadataService metadataService)
        {
            _instanceService = instanceService;
            _storageService = storageService;
            _metadataService = metadataService;
        }