コード例 #1
0
 public MainViewModel(IStorageService storageService)
 {
     if (!IsInDesignModeStatic)
     {
         _storageService = storageService;
     }
 }
コード例 #2
0
        public ItemRepository(IStorageService storageService)
        {
            _storageService = storageService.Local;
            _storageFolder = ApplicationData.Current.LocalFolder;

            LoadItems().ConfigureAwait(false);
        }
コード例 #3
0
 public HomeViewModel(IStorageService storageService, IMvxMessenger messenger, IPopupHelper helper, IMessageService messageService)
     : base(messenger, helper)
 {
     _storageService = storageService;
     _messageService = messageService;
     SelectContactCommand = new MvxCommand<ContactListItem>(SelectContactCommandAction);
 }
コード例 #4
0
		public ApiController(IErpService service, IStorageService storage) : base(service)
		{
			Storage = storage;
			recMan = new RecordManager(service);
			secMan = new SecurityManager(service);
			entityManager = new EntityManager(storage);
		}
コード例 #5
0
        // *** 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);
        }
コード例 #6
0
#pragma warning disable 4014
        public SettingsRepository(IStorageService storageService, ISqliteService sqliteService, IPlatformCodeService platformCodeService)
        {
            _storageService = storageService;
            _sqliteService = sqliteService;
            _platformCodeService = platformCodeService;
            Initialize();
        }
コード例 #7
0
 public CssStatsStorageService(IStorageService storageService, IDateTimeProvider dateTimeProvider, IHumanInterface ux, ICssStatsFileNameEvaluator cssStatsFileNameEvaluator)
 {
     CssStatsFileNameEvaluator = cssStatsFileNameEvaluator;
     Ux = ux;
     DateTimeProvider = dateTimeProvider;
     StorageService = storageService;
 }
コード例 #8
0
        /// <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;
            }
        }
コード例 #9
0
        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);
        }
コード例 #10
0
        public NewWorkoutViewModel(INavigationService navigationService, IStorageService storageService)
        {
            NavigationService = navigationService;
            StorageService = storageService;

            Exercises = new ObservableCollection<ExerciseConfiguration>();
        }
コード例 #11
0
 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];
     }
 }
コード例 #12
0
 public ProgramSettingsManager(ISystemEnvironment systemEnvironment, ILogService logService,
     IStorageService storageService)
 {
     _systemEnvironment = systemEnvironment;
     _storageService = storageService;
     _logService = logService;
 }
コード例 #13
0
 public MoviesViewModel()
 {
     movieService = ServiceContainer.Resolve<IMovieService>();
     messageDialog = ServiceContainer.Resolve<IMessageDialog>();
     storageService = ServiceContainer.Resolve<IStorageService>();
     NeedsUpdate = true;
 }
コード例 #14
0
ファイル: ShellForm.cs プロジェクト: jeffboulanger/connectuo
        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);
        }
コード例 #15
0
        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);
        }
コード例 #16
0
ファイル: MainModel.cs プロジェクト: Hitchhikrr/GDrive
        public MainModel(IGoogleAuthService googleAuthService, IStorageService storageService, ISystemTrayService systemTrayService)
        {
            _googleAuthService = googleAuthService;
            _storageService = storageService;
            _systemTrayService = systemTrayService;

            Load();
        }
コード例 #17
0
 public JavaScriptStatsStorageService(IStorageService storageService, IDateTimeProvider dateTimeProvider, IHumanInterface ux, IRelevantAttributesEvaluator relevantAttributesEvaluator, IJavaScriptStatsFileNameEvaluator javaScriptStatsFileNameEvaluator)
 {
     JavaScriptStatsFileNameEvaluator = javaScriptStatsFileNameEvaluator;
     StorageService = storageService;
     DateTimeProvider = dateTimeProvider;
     Ux = ux;
     RelevantAttributesEvaluator = relevantAttributesEvaluator;
 }
コード例 #18
0
ファイル: TileService.cs プロジェクト: ScottIsAFool/Speader
 public TileService(
     IStorageService storageService,
     ISettingsService settingsService)
 {
     _storageService = storageService;
     _settingsService = settingsService;
     _logger = new WinLogger("TileService");
 }
コード例 #19
0
 public void BeforeEachTest()
 {
     _firstInput = 0;
     _secondInput = 0;
     var mocker = new RhinoAutoMocker<Calculator>();
     _calculator = mocker.ClassUnderTest;
     _storageService = mocker.Get<IStorageService>();
 }
コード例 #20
0
ファイル: Kernel.cs プロジェクト: badelatschenfutzie/tlKernel
        public Kernel(IStorageService storageImpl, IReaderService readerImpl)
        {
            this.storageService = storageImpl;
            this.readerService = readerImpl;

            sleepTime = Convert.ToInt32(Properties.Settings.Default["ScanForTasksSleep"]);
            Console.CancelKeyPress += Console_CancelKeyPress;
        }
コード例 #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;
 }
コード例 #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;
 }
コード例 #24
0
 public TileService(IConnectionManager connectionManager, IStorageService storageService)
 {
     _logger = new WPLogger(typeof(TileService));
     _logger.Info("Starting TileService");
     _connectionManager = connectionManager;
     _storageService = storageService.Local;
     Current = this;
 }
コード例 #25
0
        public SplashScreen(IKernel kernel)
        {
            InitializeComponent();

            _kernel = kernel;
            _applicationService = kernel.Get<IApplicationService>();
            _storageService = kernel.Get<IStorageService>();
        }
コード例 #26
0
ファイル: Patcher.cs プロジェクト: jeffboulanger/connectuo
        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.");
        }
コード例 #27
0
        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();
        }
コード例 #28
0
 public MainViewModel(ILocalDataService localDataService, IStorageService storageService,
     INavigationService navigationService,
     ILiveTileServiceWP8 liveTileService)
 {
     _localDataService = localDataService;
     _storageService = storageService;
     _navigationService = navigationService;
     _liveTileService = liveTileService;
 }
コード例 #29
0
ファイル: CacheService.cs プロジェクト: ScottIsAFool/Speader
 public CacheService(
     IStorageService storage,
     IAuthenticationService authenticationService,
     ILog logger)
 {
     _storage = storage;
     _authenticationService = authenticationService;
     _logger = logger;
 }
コード例 #30
0
        public ApplicationBootstrapper(
			IInstanceService instanceService,
			IStorageService storageService,
			IMetadataService metadataService)
        {
            _instanceService = instanceService;
            _storageService = storageService;
            _metadataService = metadataService;
        }