Updated ISettingsStorageHelper references
This commit is contained in:
Родитель
8476f708f2
Коммит
e921d89482
|
@ -418,7 +418,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.Controls
|
|||
/// <summary>
|
||||
/// The local app data storage helper for storing settings.
|
||||
/// </summary>
|
||||
private ISettingsStorageHelper settingsStorage = ApplicationDataStorageHelper.GetCurrent(new Toolkit.Helpers.SystemSerializer());
|
||||
private readonly ApplicationDataStorageHelper settingsStorage = ApplicationDataStorageHelper.GetCurrent();
|
||||
|
||||
/// <summary>
|
||||
/// DocFX note types and styling info, keyed by identifier.
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
|
|||
|
||||
public static async void EnsureCacheLatest()
|
||||
{
|
||||
ISettingsStorageHelper settingsStorage = ApplicationDataStorageHelper.GetCurrent(new Toolkit.Helpers.SystemSerializer());
|
||||
var settingsStorage = ApplicationDataStorageHelper.GetCurrent();
|
||||
|
||||
var onlineDocsSHA = await GetDocsSHA();
|
||||
var cacheSHA = settingsStorage.Read<string>(_cacheSHAKey);
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
|
|||
private static SemaphoreSlim _semaphore = new SemaphoreSlim(1);
|
||||
|
||||
private static LinkedList<Sample> _recentSamples;
|
||||
private static ISettingsStorageHelper _settingsStorage = ApplicationDataStorageHelper.GetCurrent(new Toolkit.Helpers.SystemSerializer());
|
||||
private static ApplicationDataStorageHelper _settingsStorage = ApplicationDataStorageHelper.GetCurrent();
|
||||
|
||||
public static async Task<SampleCategory> GetCategoryBySample(Sample sample)
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
|
|||
{
|
||||
public sealed partial class ObjectStoragePage
|
||||
{
|
||||
private readonly ISettingsStorageHelper _settingsStorage = ApplicationDataStorageHelper.GetCurrent(new Toolkit.Helpers.SystemSerializer());
|
||||
private readonly ApplicationDataStorageHelper _settingsStorage = ApplicationDataStorageHelper.GetCurrent();
|
||||
|
||||
public ObjectStoragePage()
|
||||
{
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace Microsoft.Toolkit.Uwp.Helpers
|
|||
/// <summary>
|
||||
/// The <see cref="ApplicationDataStorageHelper"/> instance used to save and retrieve application settings.
|
||||
/// </summary>
|
||||
private readonly ISettingsStorageHelper _settingsStorage = ApplicationDataStorageHelper.GetCurrent(new Toolkit.Helpers.SystemSerializer());
|
||||
private readonly ApplicationDataStorageHelper _settingsStorage = ApplicationDataStorageHelper.GetCurrent();
|
||||
|
||||
/// <summary>
|
||||
/// The starting time of the current application session (since app launch or last move to foreground).
|
||||
|
|
|
@ -15,9 +15,9 @@ namespace UnitTests.Helpers
|
|||
[TestClass]
|
||||
public class Test_StorageHelper
|
||||
{
|
||||
private ISettingsStorageHelper _settingsStorage_System = ApplicationDataStorageHelper.GetCurrent(new Microsoft.Toolkit.Helpers.SystemSerializer());
|
||||
private ISettingsStorageHelper _settingsStorage_JsonCompat = ApplicationDataStorageHelper.GetCurrent(new JsonObjectSerializer());
|
||||
private ISettingsStorageHelper _settingsStorage_JsonNew = ApplicationDataStorageHelper.GetCurrent(new SystemTextJsonSerializer());
|
||||
private readonly ISettingsStorageHelper<string> _settingsStorage_System = ApplicationDataStorageHelper.GetCurrent();
|
||||
private readonly ISettingsStorageHelper<string> _settingsStorage_JsonCompat = ApplicationDataStorageHelper.GetCurrent(new JsonObjectSerializer());
|
||||
private readonly ISettingsStorageHelper<string> _settingsStorage_JsonNew = ApplicationDataStorageHelper.GetCurrent(new SystemTextJsonSerializer());
|
||||
|
||||
/// <summary>
|
||||
/// Checks that we're running 10.0.3 version of Newtonsoft.Json package which we used in 6.1.1.
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace UnitTests.Helpers
|
|||
// Simulate a first app startup
|
||||
_ = (SystemInformation)Activator.CreateInstance(typeof(SystemInformation), nonPublic: true);
|
||||
|
||||
ISettingsStorageHelper settingsStorage = ApplicationDataStorageHelper.GetCurrent(new Microsoft.Toolkit.Helpers.SystemSerializer());
|
||||
var settingsStorage = ApplicationDataStorageHelper.GetCurrent();
|
||||
PackageVersion previousVersion = new() { Build = 42, Major = 1111, Minor = 2222, Revision = 12345 };
|
||||
|
||||
settingsStorage.Save("currentVersion", previousVersion.ToFormattedString());
|
||||
|
|
Загрузка…
Ссылка в новой задаче