本文整理汇总了C#中IStorageService类的典型用法代码示例。如果您正苦于以下问题:C# IStorageService类的具体用法?C# IStorageService怎么用?C# IStorageService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IStorageService类属于命名空间,在下文中一共展示了IStorageService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MainViewModel
public MainViewModel(IStorageService storageService)
{
if (!IsInDesignModeStatic)
{
_storageService = storageService;
}
}
示例2: ItemRepository
public ItemRepository(IStorageService storageService)
{
_storageService = storageService.Local;
_storageFolder = ApplicationData.Current.LocalFolder;
LoadItems().ConfigureAwait(false);
}
示例3: HomeViewModel
public HomeViewModel(IStorageService storageService, IMvxMessenger messenger, IPopupHelper helper, IMessageService messageService)
: base(messenger, helper)
{
_storageService = storageService;
_messageService = messageService;
SelectContactCommand = new MvxCommand<ContactListItem>(SelectContactCommandAction);
}
示例4: ApiController
public ApiController(IErpService service, IStorageService storage) : base(service)
{
Storage = storage;
recMan = new RecordManager(service);
secMan = new SecurityManager(service);
entityManager = new EntityManager(storage);
}
示例5: SettingsRepository
#pragma warning disable 4014
public SettingsRepository(IStorageService storageService, ISqliteService sqliteService, IPlatformCodeService platformCodeService)
{
_storageService = storageService;
_sqliteService = sqliteService;
_platformCodeService = platformCodeService;
Initialize();
}
示例6: CssStatsStorageService
public CssStatsStorageService(IStorageService storageService, IDateTimeProvider dateTimeProvider, IHumanInterface ux, ICssStatsFileNameEvaluator cssStatsFileNameEvaluator)
{
CssStatsFileNameEvaluator = cssStatsFileNameEvaluator;
Ux = ux;
DateTimeProvider = dateTimeProvider;
StorageService = storageService;
}
示例7: NowPlayingViewModel
/// <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;
}
}
示例8: OpenWeatherMapService
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);
}
示例9: NewWorkoutViewModel
public NewWorkoutViewModel(INavigationService navigationService, IStorageService storageService)
{
NavigationService = navigationService;
StorageService = storageService;
Exercises = new ObservableCollection<ExerciseConfiguration>();
}
示例10: SettingsViewModelBase
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];
}
}
示例11: ProgramSettingsManager
public ProgramSettingsManager(ISystemEnvironment systemEnvironment, ILogService logService,
IStorageService storageService)
{
_systemEnvironment = systemEnvironment;
_storageService = storageService;
_logService = logService;
}
示例12: MoviesViewModel
public MoviesViewModel()
{
movieService = ServiceContainer.Resolve<IMovieService>();
messageDialog = ServiceContainer.Resolve<IMessageDialog>();
storageService = ServiceContainer.Resolve<IStorageService>();
NeedsUpdate = true;
}
示例13: ShellForm
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);
}
示例14: NotificationService
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);
}
示例15: MainModel
public MainModel(IGoogleAuthService googleAuthService, IStorageService storageService, ISystemTrayService systemTrayService)
{
_googleAuthService = googleAuthService;
_storageService = storageService;
_systemTrayService = systemTrayService;
Load();
}